Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
harmony515
harmony515's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Export 3dm file when mouse is pressed?
[1 Reply]
13-Feb-2013 12:55 AM
Forum:
Contributed Library Questions
Hi I am using iGEO with processing ...to simulate field lines...
but I have problems when I am exporting the trajectory of the partilcles out..
I am using save IG.save("test_output_file.3dm");but it save the file before any trails are made..
I would like to save the file only when I press the mouse...
Here is my code:
import processing.opengl.*;
import igeo.*;
size(480, 360, IG.GL);
IG.darkBG();
IG.open("curve_field2.3dm");
for(int i=0; i < IG.curveNum(); i++){
new ICurveTangentField(IG.curve(i)).intensity(10).linear(50);
}
new IFieldVisualizer(-20,-20,0, 20,20,0, 40,40,1);
for(int i=0; i<10; i++){
new IParticleTrajectory(IRand.pt(-20,-20,20,20)).fric(0.1).clr(1.0,0.7);
}
if (mousePressed==true)
{ IG.save("test_output_file.3dm");
}
«Prev
Next »
Moderate user : harmony515
Forum