d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Graphic Design > ~ Gfx General Chat ~
Prev1193819391940194119422193Next
Closed New Topic New Poll
Member
Posts: 8,591
Joined: Jan 6 2008
Gold: 96.65
May 21 2010 04:05am
Quote (Veilside @ 21 May 2010 10:52)
My code is now working!

Code
float myValue;
int index; // The global index variable
String[] time;
String[] heart;
String[] speed;

void setup(){
 
 size (1200, 1000);
 frameRate(10);

 time = loadStrings("time.csv");
 heart = loadStrings("heart_rate.csv");
 speed = loadStrings("speed.csv");

}



void draw(){
   float a = new Float(speed[index]);
   line(index * 10, a * 100, a * 50, a * 50);
 
   myValue = 10 * (new Float(time[index]));
   ellipse(index * 10, myValue * 20, myValue * 5, myValue * 5);

   index++; // Check when reaching 120, stop or restart at 0
}



Sort of, anyway, need to get it to loop once index hits 120.


thx, stole it.
Member
Posts: 21,066
Joined: Dec 16 2005
Gold: 100.07
May 21 2010 04:06am
Quote (Slunko @ May 21 2010 11:05am)
thx, stole it.


NP. All it does is draw a line and an ellipse according to values in a csv file.
Member
Posts: 48,531
Joined: Oct 15 2007
Gold: 100.00
May 21 2010 04:09am
party hard
Member
Posts: 8,591
Joined: Jan 6 2008
Gold: 96.65
May 21 2010 04:14am
Quote (Veilside @ 21 May 2010 11:06)
NP. All it does is draw a line and an ellipse according to values in a csv file.


crap, and i thought how witty i am! :/
Member
Posts: 21,066
Joined: Dec 16 2005
Gold: 100.07
May 21 2010 04:17am
Quote (Slunko @ May 21 2010 11:14am)
crap, and i thought how witty i am! :/


Lol.
Member
Posts: 3,528
Joined: Nov 30 2009
Gold: 0.00
Warn: 10%
May 21 2010 04:42am
Quote (Veilside @ May 21 2010 10:52am)
My code is now working!

Code
float myValue;
int index; // The global index variable
String[] time;
String[] heart;
String[] speed;

void setup(){
 
 size (1200, 1000);
 frameRate(10);

 time = loadStrings("time.csv");
 heart = loadStrings("heart_rate.csv");
 speed = loadStrings("speed.csv");

}



void draw(){
   float a = new Float(speed[index]);
   line(index * 10, a * 100, a * 50, a * 50);
 
   myValue = 10 * (new Float(time[index]));
   ellipse(index * 10, myValue * 20, myValue * 5, myValue * 5);

   index++; // Check when reaching 120, stop or restart at 0
}



Sort of, anyway, need to get it to loop once index hits 120.


do you need help or?
javascript or c#? cant tell :blink:
Member
Posts: 21,066
Joined: Dec 16 2005
Gold: 100.07
May 21 2010 04:48am
Processing, so it uses Java.

I'm all right now I've found out how to load the csv's and get it looping properly.
Member
Posts: 17,141
Joined: May 17 2007
Gold: 0.00
May 21 2010 04:53am
I've decided to not use money anymore. I demand we return to the barter system, that is all.
Member
Posts: 5,876
Joined: Nov 7 2008
Gold: 65.00
Warn: 10%
May 21 2010 04:53am


i suck :unsure:
Member
Posts: 8,591
Joined: Jan 6 2008
Gold: 96.65
May 21 2010 05:32am
Quote (SeaKitten @ 21 May 2010 11:53)
http://img27.imageshack.us/img27/8061/banhart.png

i suck :unsure:


lower part is cool, upper not dat muchas :<
Love your style tho =3
Go Back To Graphic Design Topic List
Prev1193819391940194119422193Next
Closed New Topic New Poll