DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Rotation on 2 axis doesn't give expected result

Started by altair, March 05, 2014, 01:43:26 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dempsey

Sam,

Quote...wife gets out of hospital today...

Nothing serious I hope. In the meantime look after the wife; we will wait until you have time again.
Dempsey

samdavo

Thanks Dempsey
Total Hip Replacement - operated on at 4pm (2 weeks ago now), walking next day at 10am :)
she's doing great!

PS I liked your tip about how to walk on water - wait till it turns to ice :)
THat's ok for Alberta, not very applicable for Sydney. cheers.

samdavo

Quote from: altair on March 06, 2014, 04:17:15 AM
Wow guys, you're really getting into this.
I wonder what the result would be in a different CAD program.
Maybe this doesn't happen only in [other than] DC.

Guy
Guy - any CAD package that gives you the same alignment for 20 about x ,  then 30 about z;  - as it does for the reverse sequence - isn't very accurate lol.    But thanks for pointing this problem out. 

PS You should carefully specify if the final line is to have 70 deg to one axis and 60 to another, 
or the projection has these angles on the flat orthogonal planes  ( 2 cents)

PS clearly you can;t have a line that has 20 degrees to one axis and 30 to another  - talking gammas etc now ;)   (you need the sum of the angle to be at least 90 degrees obviously)

altair

Yes Sam.
I'm amazed at the fun you've had, all of you, in analyzing this quirk.  ;D

As for myself, the problem has been solved with Phil's idea to create the axis of the cylinder, from 2 intersecting planes.

I'll try to find other amusing topics for your entertainment.  ;)

Guy

Dr PR

To give credit where due, it was prl's idea. I have stayed out of this one, although I love multidimensional (greater than 2D)  geometry.

Phil
DesignCAD user since 1987

altair

Oh sorry for this, I got confused by the similar username  :-[

prl

Quote from: altair on March 06, 2014, 07:06:11 PM
I'll try to find other amusing topics for your entertainment.  ;)

Yes, please do.  CAD, computers, math, internet; mind-travel adventures.  I like it when the expected gives the unexpected. Also heard that if you hang around a crazy person long enough, you'll be come a CAD lover.

Lar

I should stress that this 'XYZ rotation sequence' issues is not a bug. It is just happens naturally.

You can test this without a computer:
Hold a shoe on a table with the heal down and the top facing you, imagine that the shoe is at 0,0,0... the +X axis is to your right of the shoe, Y is up/down and +Z is behind the shoe.

Now rotate the shoe 90 deg on the X, then 90 deg on the Z. Leave the shoe as it ended up.

Now get the other shoe, hold it off to the side (with its own XYZ system. Remember this is real life so 2 objects cannot occupy the same space) and reverse the order of the rotation.

The first rotation ends up with the shoe pointing at you and on its side with the top facing to your right. The 2nd ends up with the shoe pointing to your left with the top facing down.

The other rotation sequence issue, like in altair's example where I pointed out that the 2nd rotation can be 30 degrees or 28.something, depends on your original intention: whether the 2nd rotational axis is the 'world-axis' or the 'object axis'. If altair wanted his 2nd rotation to be on the world axis then prl's solution is ok. If he wanted the 2nd rotation to be on the object axis then he would have to do as I suggested at the end of my first post.

What may be a real concern with altair's 2nd rotation is that the object turns slightly. This may not be an issue to altair since a cylinder looks the same all around. For me this would be an issue because I use the points of a cylinder like the points on a compass when picking up and moving it (I usually give cylinders points in increments of 8, so a turned cylinder will be off axis). In an animation this could be important because the cylinder may have a label on it and as the animation progresses the label many turn away from the camera.

Lar

prl

Quote from: Lar on March 07, 2014, 08:27:57 AM
I should stress that this 'XYZ rotation sequence' issues is not a bug. It is just happens naturally.

Lar's shoe show makes it clear.   :)   And I agree that DesignCAD is doing things correctly.  It is knowing the difference between extrinsic and intrinsic rotations, what Lar is calling world and object axes.  And I'm surprised Dt beat his way through the matrix math.  I'm no longer up to that.

prl

#39
Quote from: samdavo on March 06, 2014, 05:52:18 PM
Total Hip Replacement -  she's doing great!

Wishing her the best. 

DrollTroll

Quote from: prl on March 07, 2014, 12:21:51 PM

I'm surprised Dt beat his way through the matrix math.  I'm no longer up to that.

I barely was! "Use it or lose it" is all too true when it comes to matrix math -- I haven't done any of that in a goat's age! It took me a few false starts before the correct neurons woke up from their long nap. Now, of course, I'll probably have matrix math nightmares ("Oh no! The matrix has no determinant! What'll we do???")
25 years with DesignCAD

samdavo

#41
Doh, the shoe is so obvious.

Quote from: DrollTroll on March 06, 2014, 08:02:19 AM
Just for grins, ... for two matrices A and B, AxB is NOT equal to BxA.
IN the same way as Ted (heart) Alice is NOT equal to Alice (heart) Ted.

ok - here's another riddle.  It involves the fact that when you go to isometric, and you look at the view toolbar, you note that LEFT-RIGHT of 45 deg, and UP-DOWN of 35.26 deg.

NOW - If you start with a drawing of an object (in this case a bottle of  AUCHENT scotch (texture mapped) - SELECT ALL -
then rotate the OBJECT first about y (-45) and then x (35.26), you get the same as the ISOMETRIC when you look at FRONT view; 

But if you rotate first x (35.26) and then y (-45) and view in Front View, you get a different visually rotated end result.

YET (second half of this riddle/trick), if you set the view angles to 45 and 35 (near enough to 35.26), it makes no difference which order you set them. 

And likewise with shadows, H = 30 and V= 0 can be set in either sequence.

Final comment, in either ISOMETRIC OR in FRONT VIEW , the box mapped label of the bottle looks ok ( front-box-mapped-texture-mapped).   i.e. front for box mapping seems to rotate when you rotate the bottle. - sorry, lol - that statement is just ... 100% wrong.  apologies - front stays with front with box mapping (DOH!!)

Attachments -
#1 Isometric - note the view settings ( 45 and 35.26) - (label faces to the FRONT - which is lower left, as per normal isometric view);

#2 Front view -  note the settings (0 and 0),  one of these looks exactly like the isometric because it has all been rotated about Y and then X.  (except that the label didn't rotate -  it faces to the new FRONT);

#3 Front view - settings again 0 and 0 - but this time rotated about X and then Y
 

prl

#42
Sam, may I ask you to go to your liquor cabinet and zip up the Scotch bottle and attach it (the graphic bitmaps).

samdavo

#43
prl ( or is that DR PRL ? :)  )
I will post a zipped file of dcd + the 2 jpegs that are box-mapped onto that bottle and also on the tap.
Meanwhile Here's a thread link to a previous posting
http://forum.designcad.com/index.php?topic=5245.msg35013#msg35013

Also, just to show you that the label sticks to the front of the bottle, here's a side view  (edit - COURSE IT DOES - BUT i JUST CHANGED THE VIEW ANGLES on THIS occasion!!!  doh).

Meanwhile also, I'll add this joke received by email obviously  :)  cheers

QuoteA doctor on TV said that in order to have inner peace in our lives, we should always finish things that we start.
Since we all could use more calm in our lives, I looked around my house to find things I'd started & hadn't finished.

I finished a bottle of Merlot, a bottle of Chardonnay, a bodle of Baileys, a butle of wum, tha mainder of Valiuminun scriptins,
an a box a choclutz. Yu has no idr how fablus I feel rite now.

Sned this to all ur frenz who need inner piss.

An telum u luvum

OOPS I might be wrong about all this "mapping stays with the front" discussion.
THe attachment here was done by simply changing the view angle to the side - When I loook back at the attachments in the post above I see that the label is different after all. 

Sorry, I'm double checking that ... err hastily posted hypothesis, at the same time as doing the washing ( sunny day 30 degrees) and other dosmestic chores.  (joy of joys).   I'll be back ( as the Governator would say).


samdavo

#44
Herewith that zip file.
cheers - ein prosit der demutlichkeit!!

I find it amazing that a 2D image can become a 3D bottle. :)
and DCAD takes the credit!

You could do the same thing to make a shoe.  (later)