The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Percolation Model
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cntenthusiast

USA
1 Posts

Posted - 07/13/2012 :  10:03:13 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello, I'm a chemist and I was asked to model Percolation Theory using Origin 8.1, but I have NO Experience using C++. I know some Basic, so I am familiar with the basics of coding and syntax. Basically I need some tips on the following:

Making a square grid, such as for all integers between 1 and 100.
Be able to plot random integers only on the vertexes on the grid.
When two adjacent vertexes are plotted, a line joins them.
When a complete path is formed from left to right, it changes color to signify it.
The graph displays: the number of vertexes with points plotted on them, and fraction of plotted points/total vertices.

Any help would be appreciated.

Thanks!

dabaozha

2 Posts

Posted - 07/18/2012 :  06:57:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am trying it. Just now, I paused at the last step: path-finding. I am seeking for an efficient algorithm to find out all the points in the connected-path.


---
Jason
OriginLab Technical Services

Edited by - dabaozha on 07/18/2012 07:01:01 AM
Go to Top of Page

dabaozha

2 Posts

Posted - 07/19/2012 :  05:32:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have just figured out. But I am not sure if this picture is the very stuff you need. By the way, we can polish it if you can provide the input parameters you want. I just used the xy dimensions and the number of random integers as the input.

Jason
OriginLab Technical Services
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000