cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Rotate a quadrilateral in 3-D ?

lvl107
20-Turquoise

Rotate a quadrilateral in 3-D ?

Hi Everyone,
From the following :

Rotate 3-D (1).PNG

How to Rotate a quadrilateral and Plot its image on the Graph ?
Thanks in advance.
Best Regards.

 

ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:lvl107)

3D data format for MC15 and Prime is changed.  Prime 8 sheet attached.

 

 

image.pngimage.pngimage.pngimage.pngimage.png

image.png

View solution in original post

16 REPLIES 16
Werner_E
25-Diamond I
(To:lvl107)

A rotation around the z-axis can be accomplished by a multiplication with

Werner_E_0-1661679233013.png

For example

Werner_E_1-1661679249407.png

See also   

https://en.wikipedia.org/wiki/Rotation_matrix#Basic_rotations

or maybe (?)

https://zh.wikipedia.org/wiki/%E6%97%8B%E8%BD%AC%E7%9F%A9%E9%98%B5#%E6%97%8B%E8%BD%AC

Hi,

Rotations in 3D can also be carried out using Quaternions.

An excellent worksheet was posted on this forum that details Quaternions, and I include it here.

How to use the functions in the worksheet to do the rotation of the quadrilateral is also included.

Capture.JPG

 

I also have Prime 8 versions of the sheets if anyone wants them.

Cheers

Terry

 

 

 

I greately appreciate your time and help with your *.xmcd attacted. I don't the reason for as the following:

Rotate 3-D (4).PNG

"This variable is undefined" was shown.

Thanks again.

Loi.

Hi,

File location for the referenced sheet at the top of the page must be adjusted to suit your system where the file is located.

Capture.JPG

Right click on the little arrow and you get this pop up menu and select properties

Capture2.JPG

This pops up a tabbed dialog box go to Reference Tab

Capture3.JPG

Here you can browse button to the location of the file "220828-Quaternions.xmcd" on your system and OK.

Cheers

Terry

ttokoro
20-Turquoise
(To:lvl107)

image.pngimage.pngimage.png

image.png

lvl107
20-Turquoise
(To:ttokoro)

Thank all of you, Werner, Terry, and Tokoro. 😊😊😊@ttokoro Brief of explanation, say : Screen-shot of program functions... please. Query still exists, say : how to mirror a quadrilateral about the plane of X-axis_Y-axis ? (Screen-shot of program functions... please.)

Best, Best Regards.

Loi.

Werner_E
25-Diamond I
(To:lvl107)


how to mirror a quadrilateral about the plane of X-axis_Y-axis ?

To mirror points at the xy-plane you simply change the sign of the z-coordinate for each point!

Hi,

To mirror in the XY plane just negate the z coordinate of each point. 

If positive z turn to negative

If negative z turn to positive

So simply multiply z by -1. This also covers z = 0.

 

Capture.JPG

 

Cheers

Terry

lvl107
20-Turquoise
(To:ttokoro)

Tokoro, the reason I need help with the screen-shot of program function is : all of us don't have to re-calculate the coordinate of the points for related query :

Rotate 3-D (2).PNG
How to fill color the Octagon ? (make the "lid" for Pyramid) (see the Graph)

Rotate 3-D (3).PNG


Thanks in advance.

Best, Best Regards.

Loi

ttokoro
20-Turquoise
(To:lvl107)

3D data format for MC15 and Prime is changed.  Prime 8 sheet attached.

 

 

image.pngimage.pngimage.pngimage.pngimage.png

image.png

Werner_E
25-Diamond I
(To:lvl107)

Would this help?

Werner_E_0-1661816795501.png

Have fun with these, too 😉

Werner_E_0-1661817484362.png

For more information about the built-in polyhedra and the Wythoff notation, look up "Graphing uniform polyhedra" in the Mathcad help and open the appropriate Quick sheet it links to.

Werner_E_1-1661818157083.png

 

 

lvl107
20-Turquoise
(To:Werner_E)

Many thanks for your time and help again, Werner. I guess my question is not clear. I mean my question would be : "How to Fill Surface to Octagon so to fill different color say red color different from blue color":

Rotate 3-D (5).PNGRotate 3-D (2).PNG

Best Regards.

Loi.

lvl107
20-Turquoise
(To:lvl107)

In other words: "How to Fill Surface that Octagon ?"

Werner_E
25-Diamond I
(To:lvl107)

Here is one way to do it

Werner_E_0-1661858810447.png

MC15 sheet attached

lvl107
20-Turquoise
(To:Werner_E)

Thanks again, A clear and neat answer, Werner. My small query still exist: Is there a way to Fill Surface A Non-Regular-Octagon ?

Best Regards.

Loi.

Werner_E
25-Diamond I
(To:lvl107)


: Is there a way to Fill Surface A Non-Regular-Octagon ?

Its easy if the polygon is convex. Simply chose any point inside the polygon (you may use the center of any chord for instance) and use it the same way like I used the center of the polygon (0/0/height) in my example above when I created the structure Okta[0. Basically using the tringles formed by two adjacent polygon vertices and the center point as a 2x2 patch for the structure Mathacds 3D plot expects (doubling the center point).

Of course it is your responsibility to make sure that all polygon vertices are in the same plane!

If you look at the structure

Werner_E_0-1661867742883.png

you see the the three matrices consists of the x-, y- and z-coordinates of the points which form the surface grid.

The second row in each of the three matrices are the coordinates of the polgon vertices (the last one is repeated at the end to close the polygon) and the first row consists of the coordinate(s) of the center point - in the example shown its (0/0/6).

The next picture shows the same structure but a different point inside the polygon ->  (4/-2/6). As long as you don't draw lines and points you won't notice the difference:

Werner_E_1-1661868308863.png

You may even use one of the vertices of the polygon as "inside" point, here (12/0/6)

Werner_E_0-1661868792772.png

If you do so, you may also delete the first and last column in each of the three matrices.

 

Bu if the polygon is not convex you are out of luck with this simple method as this may take quite some additional efforts (probably not worth the time), I suspect.

Announcements

Top Tags