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 & HelpSyntax Questions › ellipseMode(EXCENTER10%);)
Page Index Toggle Pages: 1
ellipseMode(EXCENTER10%);) (Read 463 times)
ellipseMode(EXCENTER10%);)
Jun 13th, 2009, 8:27am
 
is there something how i can make the ellipse pivot neither CENTER nor CORNER, but something in between?
Re: ellipseMode(EXCENTER10%);)
Reply #1 - Jun 13th, 2009, 8:43am
 
I don't understand the question. I feel the answer is "change the coordinates or use translate()", but perhaps I am not answering you?
Re: ellipseMode(EXCENTER10%);)
Reply #2 - Jun 13th, 2009, 11:00am
 
thanks PhiLho! ..i want to turn an ellipse (circle) around an excentrical point, a bit out of the center... its certainly a very beginners question and i have to do it with translate or so...
Re: ellipseMode(EXCENTER10%);)
Reply #3 - Jun 13th, 2009, 11:36am
 
Code:
float angle = 0;
int ELLIPSE_WIDTH = 300;
float OFFSET = ELLIPSE_WIDTH * 0.15;
void setup()
{
size(800, 800);
}

void draw()
{
background(250);
angle += 0.1;

pushMatrix();
translate(200, 400);
rotate(angle);
fill(202);
ellipse(0, 0, ELLIPSE_WIDTH, 180);
fill(#FF0000);
ellipse(0, 0, 4, 4);
popMatrix();

pushMatrix();
translate(600, 400);
translate(-OFFSET, 0);
rotate(angle);
translate(OFFSET, 0);
fill(202);
ellipse(0, 0, ELLIPSE_WIDTH, 180);
fill(#FF0000);
ellipse(-OFFSET, 0, 4, 4);
popMatrix();
}
Re: ellipseMode(EXCENTER10%);)
Reply #4 - Jun 15th, 2009, 1:36am
 
thank you so much!
i have to check the translate function...
http://www.flickr.com/photos/lumicon/
Page Index Toggle Pages: 1