NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
May 25, 2019, 11:14:14 pm

You cannot always have happiness but you can always give happiness. ..."Mother Teresa(1910-1997, Roman Catholic Missionary, 1979 Nobel Peace Prize)"

 Pages: [1]   Go Down
 Author Topic: How can i transform a 3D cylinder using 2 transformation with dynamic variables  (Read 7381 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message on: November 09, 2009, 09:54:12 am » posted from:Singapore,,Singapore

Hi Prof,

How can i transform a 3D cylinder using
Code:
"z:"+cta
and
Code:
y:90d

each works on its own but i can't figure out how to add both.
for example i tried but it doesn't work
Code:
"y:90d & "z:"+cta"

my reference:

i want a rotating cylinder with both transformation to achieve the look of a cylinder

attached in my source xml for
 ACdiscproblem.PNG (13.55 KB, 411x345 - viewed 460 times.)  Acdisc.PNG (1.49 KB, 113x88 - viewed 557 times.) *** There are 1 more attached files. You need to login to acces it! « Last Edit: November 09, 2009, 10:12:05 am by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3082

 « Embed this message Reply #1 on: November 09, 2009, 05:04:54 pm » posted from:Taipei,T'ai-pei,Taiwan

If you want to do "z:"+cta then "y:90d",
you should set the property to "z:"+cta+" & x:90d"
If you want to do "y:90d" then "z:"+cta
you should set the property to "x:90d & z:"+cta

Because cta is a variable so it need to be outside the string and added to property string with "+" operator.
 Logged
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: November 09, 2009, 08:01:49 pm »

Fantastic tips. Thx a million!
Will try later

finally understood the logic is additive.

using
Code:
"y:90d & x:"+cta

to achieve the same effect! thx!
 « Last Edit: November 09, 2009, 09:40:50 pm by lookang » Logged
 Pages: [1]   Go Up
You cannot always have happiness but you can always give happiness. ..."Mother Teresa(1910-1997, Roman Catholic Missionary, 1979 Nobel Peace Prize)"