NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 18, 2017, 11:50:18 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Life is an inspiration. ..."Mahatma Gandhi(1869-1984, The greatest leader of modern India)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

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

Posts: 1784


http://weelookang.blogspot.com


WWW
«
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:
http://www.um.es/fem/EjsWiki/Main/ElementsAboutTransforms

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 350 times.)

* Acdisc.PNG (1.49 KB, 113x88 - viewed 472 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
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
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 Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
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
  Print  
Life is an inspiration. ..."Mahatma Gandhi(1869-1984, The greatest leader of modern India)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Thermal dynamic processes: isobaric, isochoric, isothermal, adiabatic processes
Thermodynamics
Fu-Kwun Hwang 15 241472 Last post December 29, 2012, 01:24:18 pm
by koclup1580
cylinder touching wall
Question related to Physics or physics related simulation
pradeep123 1 6872 Last post December 31, 2008, 09:48:12 pm
by Fu-Kwun Hwang
Thermal dynamic processes: isobaric, isochoric, isothermal, adiabatic processes
thermodynamics
ahmedelshfie 1 6530 Last post May 15, 2010, 01:53:55 am
by ahmedelshfie
Length contraction (Special Relativity:Lorentz transformation)
Modern Physics
Fu-Kwun Hwang 0 25389 Last post February 28, 2011, 05:47:52 pm
by Fu-Kwun Hwang
how to transform about an axis a rotation using Matrix3DTransformation ?
Questions related to EJS
lookang 2 13708 Last post August 24, 2012, 03:16:04 pm
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.069 seconds with 23 queries.since 2011/06/15