Visio 2016 3D rotation problem in the shapesheet formulii

Started by cliff50, May 22, 2018, 05:02:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cliff50

Hi,
I am trying to get a cube with "4" on 4 sides spinning with integrity.

attached  Visio pro 2016 doc with macros.

so far I have the 4 x sides spinning using a macros via the "addins" tab.
Addins-->  "left arrow" "right arrow" "up arrow" "down arrow".

But, the top "lid" wont spin flat on top of the cubic 4 image.

I am thinking there must be a correct grouping of algorithms in the lid's shapesheet, that can be deployed into the rotational cells of the 3D shape section.
any ideas to make it spin correctly is appreciated.

I think this harkens back to the debate of X Y Z axis  rotations will affect across all 3 axis.
none the less ... 


cheers
Cliff

wapperdude

You might want to check out this post by JuneTheSecond:  http://visguy.com/vgforum/index.php?topic=4178.msg16740#msg16740.  Can't recall if he has additional posts on the topic or not.  Vaguely remember that he explored the 3D rotation capability.

Wapperdude
Visio 2019 Pro

cliff50

hey Wapper,
yes i read Junes post .
Not sure if you have visio 2016 though.
In the 2016 version the "alchemy" of rotational 3D  in the shapesheet is available via the 2016 edition.
The effects section allows the operator to rotate XYZ axis on that are shapes created in 2016 version.

I trying to macro manipulate the shapesheet cells so that the "lid" will fit and perform on the box.
I can do it via the "effects" method provided in 2016 But,.....   I trying to macro the "effects method" and inject a formula into the shapesheet cells of the "lid" shape.   This way i can use the addins customised arrow keys to roll the cube about the page.. as opposed to wearing out my left click mouse button  using the effects button in 2016.


wapperdude

Sorry Cliff,  I can't help more...V2007 was my stopping point.

Wapperdude
Visio 2019 Pro

vojo

visio 3d uses Eulers methods for rotation.  There are some limitations to Eulers
(sequence of actions affect final result, in the real world - Eulers approach can get into Gimbal lock...maybe you are seeing gimbal lock on the roof)

One trick I found is the following

Geometry1.x1 = formula + (-1/tan (30 deg))*height
Geometry1.y1 = formula + (-tan(30 deg))*width

Will rotate a square into a lid (scaling has to be factored into cell formulas)...perhaps playing with the angle
can accomplish what you want (I have not tried that ...focus on isometrics)

maybe debug this by comparing lid with a lid rotated 5 degrees...see what is happens / what the differences are?
might give insight.

cliff50

hi Vojo,
thank you for your insight , interesting you say eulers formula is "behind the scenes" in visio.


ultimately I am trying to construct muliti-sided image that will rotate "faithfully" in -> a hemisphere
as you would see in most terrestrial based objects.

with all -> 6 sides different from each other...  imagine a -> dice   sitting on a table  (the underside view is not important at this stage ) because my fear the image will be complicated by -> whats in front etc. therefore 360 deg  in a hemispherical view only

I have seen the fine work June did with 3D perspective rotations (pre V2016), I think June's formulii  (or very similar) are manifest in the 2016 release.

Now, I know I can construct and rotate 4 X different  sides (dice-> 2,3,4,5) faithfully using a macro that will spin those for sides in X Y,Z axis. however (dice side1,"top and 6 bottom) I am having difficulties.

Using the same "side" construction syntax, for 1 or 6   as previous successful with sides 2,3,4,5  will not "put the lid on the box"  >:(

because in Visio 3D rotation menu , the moment you roll a side off the Y axis away from 0 degrees, then try to rotate the X axis, all 3 axis are affected, the rotationXangle, rotationYangle rotationZangle shape sheet cells all fluctuate in value in a "non linear" fashion.

Now this 3 way formula manipulation (due to Y axis off 0 degrees), I could cope with in a macro , but the algorithms are ... -> "sophisticated".

Plan B would be to inject a "connection point" on any corner of sides 2,3,4,5  and this would allow a shape to be glued in onto sides 1,6

Now the connection point injection, can be accomplished using June's formulas, and experiments indicate that XYZ co-ordinate control of connections points in the "June" 3D sphere (if i could coin it that) are spinning faithfully.

Some very complex images could be created,........ imagine a->  a 3D version of "join the Dots" :o

cheers
Cliff

vojo

Plan B wont work since a connection point does not translate to 3D (at least in 2013)

June also did work to do rotations in a much more correct way using user functions to do tranformation matrices.
(in essence, a whole bunch of user cells called by a user function to implement new X,Y,Z).
I don't think he used quadarions (sp) but probably easy to extend his stuff to that (Qs are 4 X 4 transforms with no gimble lock)

May want look at those.

Scaling aside, the trick in last post gives you a lid from a 2D square...may want to play with it

good luck