Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: JuneTheSecond on August 23, 2012, 06:42:58 AM

Title: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on August 23, 2012, 06:42:58 AM
This drawing is a group of duplicated rectangles made with Visio 2013 Preview.
I expect more or custom Effects would be added in future.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on August 28, 2012, 01:32:21 AM
This kind of effects and 3-D rotation are already seen in Word 2010.
Now in Visio 2013 preview.
But we need detailed description,
mainly about "Parspective Angle", "Distance from Bottom",
and where is the view point of the perspective view.

I've tried to analyze on the Visio drawing, and got some results.
Here is the drawing that explain how I did.
Please enjoy.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on August 31, 2012, 07:13:50 AM
The nature of 3-D rotation is mysterious, it does not depends on the order of sequential operation.
For example, 30 degrees to x-direction, 20 degrees to y-direction and 15 degrees to z-direction give the same result as reversed sequence of operations.
Many text books in mathematics tell us the result of sequence of the rotation changes with the order of the operation.
This was because, the axis moved during these operations.
I thought you can see it easily, if the 3-D axis is shown on the drawing.
I hope you enjoy 3-D rotation with attached drawing in Visio 2013 Preview version.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on August 31, 2012, 01:46:34 PM
FYI....in libre office draw (and probably open office) ....doing this kind of thing does depend on the sequence
I will say LO Draw is a real mess in this area
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: wapperdude on August 31, 2012, 03:09:23 PM
Actually, in real life, the order of rotation does make a difference. 

Reason, the 3 axis don't move, the object does, thus, it's relative x-, y-, z-coordinates change.  That is, a book has a fixed width, length, and height, but, depending upon it's position, the width could be any of the three axis.   Sitting on a desk, cover up, normal reading, the x-axis is page width, y-axis is page height, and z-axis is book thickness, where x- & y-axis are in the plane of the desk, and  z-axis is sticking up into the air from the desk surface.  To easily verify the rotation order, do full 90 deg rotations. 

Rotate the book 90deg about each axis, in the order of z, then y, and then x.  Result of each rotation:
  none:  as stated above
  z-axis:  book is still face up, but height is x-axis, width is y-axis, top of book is to the left.
  y-axis:  book is now standing, top is on the desk: thickness is x-axis, width is y-axis, and height is z-axis.
  x-axis:  book is now standing on the long edge, binding facing up:  thickness is along x-axis, height is along y-axis, and width is along z-axis.

Now, return the book as before and reverse the order, this gives you:
  x-axis:  book is on top edge, binding to the left:  x-axis is width, y-axis is thickness, and z-axis is page height
  y-axis:  book is on long edge, binding on the desk, top of book is to the right:  x-axis is page height, y-axis is thickness, z-axis is page width
  z-axis:  book is on long edge, but in orientation that you would hold if you wanted to open the book to read normally:  x-axis is thickness, y-axis is height, z-axis is width.

I gave the results to verify the direction of rotations and to spot any errors that I may have made.  Keeping the rotations about the axis can be dis-orienting.

HTH
Wapperdude

Ed.:  Added drawing to help visio-lize.   ;)
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 01, 2012, 05:24:53 AM
Thank you, all.

I made a new drawing.
When you turn the shape to x-direction, a satellite runs along the orbit
in the 3-D perspective view.
The orbit changes when you turn to y or z.

Please enjoy.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: wapperdude on September 01, 2012, 05:39:23 AM
Hmmmm.  That's the new file format.  Need to get V13 to have fun with it.   I think MS should make you part of their marketing team.  The capabilities that you so ablely demostrate are powerful sales tools!

Wapperdude
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 01, 2012, 07:37:57 AM
Thank you, wapperdude.
Please, install Visio 2013 Preview and enjoy.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 01, 2012, 12:38:02 PM
I am sorry that until now I did not noticed that
3-D rotation by spin buttons and by icons are quite different.

The clicking icon turns the object in fixed xyz axis by 5
degrees that is 1 round by 72 click around x y z axis each.

It is quite differnt from that of by the spin buttons.
The rotation by spin buttons looks mysterious,
but the rotation by clicking icons is quite normal.

Please, forget all my above comments.




Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 02, 2012, 01:39:25 AM
3-D rotation with icons changes by the order of the operation.
The figure below shows the changes.
It looks the same as I learned in matematical 3-D rotation.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 02, 2012, 04:49:08 AM
Edited drawing animates the revolution along orbit.
Right click menu on the shape start running.
This drawing uses VBA macro,
please enable VBA macro.

I hope you enjoy, thank you.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on September 02, 2012, 03:59:37 PM
So been hearing alot about the 3D stuff.     Unfortunately, due to corp lunacy, still on XP.   So got to wrestly with the corp gods about upgrades to windows 7 and visio 2013.   Is it fair to infer that the this 3D stuff for visio 2013 would allow one to, say, take a cube and rotate arbitrarily in all 3 axis.   Aka like wrapperdudes sequence example BUT not have to manually make
each manifold in those 9 examples.   I.e. take a cube and, whether icon or controls, rotate it around along various axis?   I.e. perhaps a
poor man's Sketchup?   Can I assume this can be done with groups of 3D shapes?
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 04, 2012, 11:35:29 AM
If word 2010 is running in your PC,
3-D effects and 3-D rotations are basically the same
as Visio 2013 preview.
I think you can evaluate new feature in word 2010.
Following page would be greate help for preliminary estimation.
http://msdn.microsoft.com/en-us/library/office/hh965406.aspx#odc_wd14_ta_ManipulatingShapes_SmartArt

Add to the information to this document, word 2010 have IncrementRotationX,
IncrementRotationY and IncrementRotationZ methods.
They are usefull to play animation of 3-D rotation.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: Visio Guy on September 04, 2012, 12:49:44 PM
This is very cool (as usual) JTS!

It seems to me that Visio 13 needs a quick way to toggle between 3D effects and "flat". I haven't found anything like this, other than the "Reset" button. Has anybody else?

The problem is that you need to create artwork in "flat" mode, then pop it into 3D. While working on something, you will do this many times. Having to tweak X, Y, Z rotation angles each time to go back into 3D will be frustrating.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 11, 2012, 11:56:02 AM
I made a drawing having icon simulator for 3-D rotation.
Icons on the drawing simulate icons on the embedded window for 3-D Rotation.
I watched the behavior of 3-D rotation, and found how to trace it.
We can make 3-D rotation matrix R from a set of angle.
Each my icon has rotation matrix Rx, Ry.
When you double-click themy icon,
New matrix Rn = R*Rx or Rn = R*Ry is made for each icon.
New set of angles for x, y and z can be calculated from new matrix.

Please enjoy double-clicking the icons in Visio 2013 Preview.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 15, 2012, 12:15:52 PM
I've modified icon simulator for 3D Rotation.
1. All shapesheet function ATAN were changed to ATAN2.
    ATAN2 allows wide range in angle than ATAN.
2. Added a tool that can change the angle to increment.
    you can change angle, if you edit text on the shape.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 23, 2012, 02:03:33 AM
I am now making a paper plane like one on the pictire.
It rotate in 3D space.
I still have some problem when I turn the plane.
It is a matter of zorder of the shapes.
But I hope the problem will be fixed soon.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: wapperdude on September 23, 2012, 02:08:42 AM
Fascinating problem.  The wing Z-orders must change depending upon the rotation. 

Wapperdude
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 23, 2012, 10:59:42 AM
Fixed about 80 percent of the z-order problem.
Attached drawing users VBA macro to change z-order.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on September 23, 2012, 02:34:23 PM
June....though I dont have beta 2013 and, thus, dont know how it works specifically, but I have built off your work using visio 2003, isnt all this really a problem of mapping 3D space into 2D space.   There are lots of doc on the web about the matrices needed to do the mapping.

If you go down a VBA approach, would you just implement the translation matrices then convert to visio formulas  (I realize the last part is tough and frankly blocked me from trying to do a 2003 VBA macro.....obviously, you are much better at this than me).    Ie something like
- Get a vertex in current shape
- translate to common 3D (X, Y, Z, and Alpha, Beta, Omega angles from a reference point)
- do some rotation
- translate back to 2D (X,Y)
- Create visio 2013 vertex formulas and write it to shape sheet.

Like I said, this blocked me (could do well except last hop back to vertex 1....never tried it with raw POINTS approach...maybe that works).
So I may be oversimplifying this.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on September 23, 2012, 02:38:06 PM
Come to think of it....you could do the following
- Devise formula for path for last hope (which by the way gets on top of the MOVETO point)
- New last row that closes end of last hop to MOVETO (so you can close the the shape).

Ya know...until I wrote previous, doing something like that never occurred to me.

Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 24, 2012, 05:41:46 AM
I've modified the drawing a little.
Now you can copy paper plane and can give different views at once.
When you rotate, all planes turn, but keep different views.

Thank you Vojo for your comment.
I am now still at the entrance step to learn 3d-rotation matrices.
So, this new feature in Visio 2013 preview is strong helper for my learning.
It is new and  free to download.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on September 24, 2012, 05:58:01 AM
Another View.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on October 03, 2012, 12:26:30 PM
Added propellor and pilot's window.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on October 05, 2012, 07:02:01 AM
3 angles in 3D rotation is a kind of Euler angles, angles around x, y and z axis.
YXZ sustem is used in Visio 2013 Preview that is the same as in other Office applications.
The rotation matrix Rz.Rx.Ry is composed by multipling 3 rotation matrix around x, y and z axis.
I made a simple vsd drawing that rotates a cube made in Visio 2010.
Rotation matrix Rz.Rx.Ry is used in this drawing.
I felt more complicated shape is very difficult without the power of Visio 2013 Prebiew.

You can rotate cube by selecting right-click menu or enter angles in the shape data table.
Please enjoy.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on October 12, 2012, 11:37:30 AM
This is rotatable 3D cube works in Visio 2007.
Parameters like in Visio 2013 are available in shape data table.
You can change perspective view angle, thickness of the shape, etc..
You can rotate shapes with control points to x or y directions.
These shapes are simple Visio shape.
All behaviors are performed by the rotation matrix in the shapesheet.
Macro is not used.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: Paul Herber on October 12, 2012, 11:41:15 AM
Fantastic, Yunichi!
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on October 12, 2012, 12:56:29 PM
Yunichi....outstanding.....quite impressive!!!
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: wapperdude on October 13, 2012, 12:13:45 AM
Very cool!   8)

Lot of work!!!

So, is it time to think about the DirectX spinning cube?  Just kidding!

Wapperdude
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on October 15, 2012, 12:17:14 PM
RE spinning

Or somebody could dig up the old animation work I did, pull the VBA that does the time increment (about 10 lines) and make a macro  that spins
the block.   

Currently on 2003....This is the first change in visio since then that has me really thinking I should move forward
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: cliff50 on October 16, 2012, 03:51:20 AM
Hi ,
I liked Junes 3D box so much   :)... I added a VBA mod so that you may rotate it via the mouse control.
ref attchment.
open as per Junes version, then hold the cntrl button down and the left mouse button down....  then move the mouse left and right.

Cheers
Cliff
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on October 16, 2012, 07:53:37 AM
Very cool!
It rotates smooth as if on the air.
Thank you Cliff.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 02, 2012, 07:00:55 AM
Here is 14 pieces of Visio shapes.
Each shape rotates like a 3-D shape with controls or shape data.
You can rotate in Visio 2007 or in Visio 2010.
These shapes are made by attatched macro.
You can change your shape into 3D.
The shape must be simple and drawn by straight lines.
If you run this macro, your shape will be unified.
If your shape is important, please backup your shape
before running macro.

The macro to make 3D shape is just a simple proto type.
This macro has no error handling.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 05, 2012, 12:17:19 PM
Added cylinder and cube with hole.
Though they can not be made automatically with attatched macro.
Front color is green and back color is gray.
Enjoy rotating with controls.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on November 05, 2012, 07:52:30 PM
real nice....have you tried it with XP (do you think its worth trying on XP if XP is my only option)
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 06, 2012, 02:06:46 AM
1. In WindowsXP with Visio2003.
    You can open drawing.
    But cannot rotate, and cannot run macro.
    The reason is that Visio2003 does not support EVALCELL function.
   
2. In Windwos7 with Visio2007.
    Rotate very smooth than in Visio2010, and can macro.

3. In WindowsXP with Visio2007.
    I hope you can rotate and run macro, though I did not examine.
   
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 09, 2012, 04:02:56 AM
Added more 3D shapes.
Slide controls or change shape data,
and shape rotates  in Visio 2007 or Visio 2010.
Please, enjoy and see where is the limit in Visio.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: vojo on November 09, 2012, 03:57:04 PM
great stuff!!!

So I am curious about something

Assume you have a cube and you have small cylinder attached to the "back" of the cube
Assume you group them (or union them or or or)

When I rotate the combo say 180 in X plane, does cylinder rotate around and come to the front of the "group"?
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: cliff50 on November 10, 2012, 07:13:57 AM
 :) great work June.   is it possible to have individual colors on each of the cube's sides?  Perhaps make a dice image using this method ? just a thought  ???
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 10, 2012, 11:44:39 AM
I think possible.
For example, the star.
I need to find a simple way how to decide
each surface is visible or not,
and how to decide the z-order of visible
surface to hide partially invisible parts.
They are changing while shape is rotating.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: cliff50 on November 11, 2012, 06:28:16 AM
I was thinking , if a shape (a simply square) only rotates on it's  Y axis, its begin X and end X co ordinates may be used as the trigger of shape visibility.
This action can be conditionally programmed in the shape sheet cells of the square.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on November 11, 2012, 06:56:51 AM
For a cube, it is simple, and visiblities are solved in the shapesheet formula,
if you apply User.Front,,,,User.Bottom for perspective view,
and User FB,,,,User.TB to noshow cells.
For various face color, you need to add another shape with various color
on each face of the cube with shapesheet function like a
=PNTX(LOC(PNT(Sheet.1!Geometry8.X1,Sheet.1!Geometry8.Y1)))
as already used in the shapes for perspective drawing at
http://visguy.com/vgforum/index.php?topic=1247.15.
Title: Re: Perspective View with Visio 2013 Preview 3D Effects & Rotation
Post by: JuneTheSecond on December 06, 2012, 07:57:04 AM
As the articles are leaving from Visio 2013 Preview,
I would like to continue in the User-submitted Stuff.
http://visguy.com/vgforum/index.php?topic=4368.0