APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

3D transformation to create Nets of a Rectangular Based Pyramid post and replies

Return to the 3D transformation to create Nets of a Rectangular Based Pyramid thread
Login to post to this thread

3D transformation to create Nets of a Rectangular Based Pyramid
lookang Avatar
lookang
245 Posts

Dear Paco and Wolfgang, thank you for the wonderful EJSS modeling tool, i am beginning to create mathematics stuff.

thanks to EJSS, i can make cool 3D stuff for example http://iwant2study.org/ospsg/index.php/interactive-resources/mathematics/measurement-and-geometry/geometry/2-3d-shapes

 

but i am unable to figure out how to make a net 2 (see picture) follow the Pyramid as it unfolds into a flat plane. net 1 was successful completed.

Request

can look and edit my source code directly to make it work?

anyone is of course welcome to help as well!

 thank you!

 

Post edited July 14, 2016 at 5:10 AM EST.

Attached File: ejss_src_netsofprismwee.zip


OSP@SG blog
OSP@SG Digital Library

Replies to 3D transformation to create Nets of a Rectangular Based Pyramid

Re: 3D transformation to create Nets of a Rectangular Based Pyramid -
mrg_psu
9 Posts

Lookang (or any one else) Is there documentation on the transformation element?  Is it possible to compound successive transformations?

-Mike Gallis



Re: 3D transformation to create Nets of a Rectangular Based Pyramid -
lookang Avatar
lookang
245 Posts

Based on my memory,
I tried to use the syntax
[[Angle, x-axis,y-axis,z-axis]] to control the rotation in Ejss.
To compound series of transformation, use the group icon where group is the first to transform.
In this example,
http://iwant2study.org/ospsg/index.php/interactive-resources/mathematics/measurement-and-geometry/geometry/2-3d-shapes/411-netsofsolidswee
I did a lot of such transformations.

Post edited September 14, 2016 at 7:39 PM EST.


OSP@SG blog
OSP@SG Digital Library


Re: Re: 3D transformation to create Nets of a Rectangular Based Pyramid -
mrg_psu
9 Posts

Thanks Lookang

I did manage to figure out some of what you said through experimentation and examples.  In order to show a ball spinning about a tilted axis, I first rotate it about Z (easy orientation of the texture file I am using), then tilt it about the x axis by the complimentary angle of a specified altitude angle and a final "azimuth" rotation of the axis.  The (converted to radians, complementary angle stuff done in background) looks like this:
[[az_rad,0,0,1],[tilt_rad,1,0,0],[rotation,0,0,1]]

I was surprised to find the order the transformations are applied is right to left, but I'm guessing it's being interpreted as a stack of transformation instructions (last in, first out) rather than an ordered list.

So I'm at the point where my spinning beach ball looks pretty cool, and I'm ready to add the interesting physics (gravity, drag, buoyancy and magnus effect)!



Re: Re: Re: 3D transformation to create Nets of a Rectangular Based Pyramid -
lookang Avatar
lookang
245 Posts

Thanks Michael,

 

i managed to build on your tips

yaw is [[0,1,0,0],[0,1,0,0],[yaw,0,0,1]]

pitch is [[0,1,0,0],[pitch,0,1,0],[0,0,0,1]]

row is [[row,1,0,0],[0,0,1,0],[0,0,0,1]]

and it's rotation can be predicted by the right hand grip.

http://iwant2study.org/ospsg/index.php/interactive-resources/mathematics/measurement-and-geometry/geometry/2-3d-shapes/438-glimbal8wee02-1

 


OSP@SG blog
OSP@SG Digital Library


OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book