Hi,
 
I dont really understand the question, so tell me more if the following does not answer it. As i think I understand, the rotation is time based and the size depends on dragging a point on the Y-axis? Basically to resizing is always relative to a point. The resize moves all points of the object but this one (it does not have to be part of the object). Say this point has coordinates (a,b,c) and any point of your object is (x,y,z) and f is the factor you want to resize the object ( a multiple of the y coodinate that you drag (f = c*ydragged)). Then first subtract from (x,y,z) the point to get (x-a, y-b, z-c), moving the object to the origin. then multiply by factor: (f*(x-a), f*(y-b), f*(z-c)) to resize and finally add the invariable point: (f*(x-a)+a, f*(y-b)+b, f*(z-c)+c) to move the object back. Do this for each vertex and you are done (mathematically speaking). Ofcourse if for example your cone starts in the origin, a=0, b=0,c=0 and if ydragged = f then c=1 and you get (x,y,z) -> (ydragged*x, ydragged*y, ydragged*z).
 
hope this helps 

Lars
 
 
 -----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]On Behalf Of Vishal Sodani
Sent: donderdag 18 maart 2004 4:20
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Mathematical Problem

My problem - Solids of revolution

 

I have an x -axis and y-axis, where x is constant, whereas y keeps changing (user can drag a point on y-axis say from 1 to 2).Depending on this, I need a dynamic visualization (3D) of a solid (like a cone) which changes its structure(size increases/decreases) as y-changes and its volume also changes- this change needs to be shown(as revolving solid) about the x- as well as y- axis(in total 3 visuals). Obviously there is mathematical formula that I have to use.
thanks
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to