FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   line connecting 2 ellipses
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: line connecting 2 ellipses  (Read 287 times)
firdosh


line connecting 2 ellipses
« on: Jun 4th, 2004, 3:46am »

I am confused as to how the translate and roatate works
ellipse(10,10,5,5);
ellipse(100,200,5,5);
//gets the angle between 2 ellipses
float angle=atan2((200-10)/2,(100-10)/2);
rotate(angle);
 
line(10,10,100,200);
 
this doesnt work....i need to show a line extending from one ellipse to another
 
 
 
JohnG

WWW
Re: line connecting 2 ellipses
« Reply #1 on: Jun 4th, 2004, 10:32am »

You don't need the rotate part of that code (or calculating the angle) the line command will draw what you want on it's own.
 
Pages: 1 

« Previous topic | Next topic »