We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › How to show ellipse in animation way
Page Index Toggle Pages: 1
How to show ellipse in animation way (Read 2437 times)
How to show ellipse in animation way
May 12th, 2010, 6:30am
 
Hi how can we increase or decrease the size of the circle. I mean from big circle to small, small to big in slow motion. Can any one help me please.
Re: How to show ellipse in animation way
Reply #1 - May 12th, 2010, 6:37am
 
Make a global variable, eg. call it diameter. Make also a size change variable, eg. step.
In draw(), draw the ellipse using this diameter as width and height, then add step to diameter: diameter += step;
If diameter is above max size or below min size, change sign of step: step = -step;
Re: How to show ellipse in animation way
Reply #2 - Jun 3rd, 2010, 7:29am
 
am very sorry philho for late reply,am out of town can u explain with some sample code.
my thesis project is visualizing emails. in my project am showing number of emails data in visual way  am getting problem in my
code

void drawData(float x, float y, String abbrev) {
float value = locationTable.getFloat(abbrev, 3);
float radius = 0;
if (value >= 0 && value<=55) {
//radius = map(value, 0, dataMax, 1, 10);
a+=0.05;
fill(#4422CC); // blue
} else {
 b+=0.05;
//radius = map(value, 0, dataMin, 1, 10);
fill(#FF4422); // red
}
ellipseMode(CENTER);
//pushMatrix();
//rotate(a);
ellipse(x, y, a%15, b%15);

where a and b are global variables in this code i want to show ellipse in animation way increase or decrease and ellipse size should be small if value is more eg: value = 54 ellipse should be small in animation way, if value is more than 60 ellipse size should be more.

Thank you very much for u help

regards
kumar
Re: How to show ellipse in animation way
Reply #3 - Jun 8th, 2010, 4:30am
 
hi can any one help me please
Re: How to show ellipse in animation way
Reply #4 - Jun 8th, 2010, 4:50am
 
I fear I hadn't fully understood your needs (I get that English isn't your first language...).
In particular, I don't get the "in animation way" part.
Nor what are the start / end values, etc.
Re: How to show ellipse in animation way
Reply #5 - Jun 8th, 2010, 5:04am
 
not sure either if i understand. but do you want to change the size of your circles from one value/size to another but in a smooth way, not just changing it from one frame to another you can use a tween library to do that for example. This is a demo using ekenes tween library to change the Size/Value of bargraphs, but would be the same with your circles.

http://ekeneijeoma.com/processing/motionlib/examples/Tween_Bar_Graph/applet/inde...
Page Index Toggle Pages: 1