Author Topic: Visio Animation Template  (Read 81593 times)

0 Members and 1 Guest are viewing this topic.

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Visio Animation Template
« Reply #30 on: April 11, 2011, 03:14:14 PM »
Very nice.....the intriguing piece of this is the rotating of the plane....Can you post the source for this?
Curious about the 3D to 2D translation

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #31 on: April 11, 2011, 11:05:14 PM »
Vogo, the demo of the rotating 3D plane is actually three seperate pages. one page is the "graphics engine" with two circles  "pan" and "tilt"  the other two pages are foreground and background. the background page accomadates the "slab" on a layer(which which can be toggled visible\invisible) .. if you watch carefully at the beginning you will also see a faint grey large "X".. these are the "cross hairs"  (essentially just lines) whose angles and rotation formulas are dependent on the "pan tilt" circles..  sounds convoluted  .. yes it was. :-\.. the slab (i think) was glued to the ends of the cross hairs

I will see if I can find some of the source code for you in the near future

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #32 on: April 12, 2011, 12:02:53 AM »
Very nice.....the intriguing piece of this is the rotating of the plane....Can you post the source for this?
Curious about the 3D to 2D translation


Public Sub PanLeft()
Dim twist As Double

If ActiveWindow.page = "Page-125" Or ActiveWindow.page = "Background-4" Then
    twist = 0.001
    HaltRotation = Not HaltRotation 'toggle the HaltRotation rotation
    enclosure.Cells("Geometry1.NoShow") = True
    For I = 1 To 1000
    Plan.Cells("angle") = Plan.Cells("angle") - twist
    PanAngle.Formula = Plan.Cells("angle").Formula
    If twist < 0.05 Then
        twist = twist + twist
    End If
    DoEvents
        If HaltRotation Then
            Exit For
        End If
    Next
End If

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #33 on: April 12, 2011, 12:04:30 AM »
Very nice.....the intriguing piece of this is the rotating of the plane....Can you post the source for this?
Curious about the 3D to 2D translation


Public Sub TiltUp()
Dim twist As Double

If ActiveWindow.page = "Page-125" Or ActiveWindow.page = "Background-4" Then
    twist = 0.001
    HaltRotation = Not HaltRotation
    enclosure.Cells("Geometry1.NoShow") = True
    For I = 1 To 1000
    Profile.Cells("angle") = Profile.Cells("angle") - twist
        If twist < 0.05 Then
            twist = twist + twist
        End If
        If Profile.Cells("angle") < -1.5707963269998 Then
            Profile.Cells("angle") = -1.5707963269998
            Exit For
        End If
        TiltAngle.Formula = Profile.Cells("angle").Formula
        DoEvents
        If HaltRotation Then
            Exit For
        End If
    Next
    TiltAngle.Formula = Profile.Cells("angle").Formula
End If

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #34 on: April 12, 2011, 12:08:22 AM »
Very nice.....the intriguing piece of this is the rotating of the plane....Can you post the source for this?
Curious about the 3D to 2D translation

Vojo, not sure if I can send the lot as there are many sub routines  but maybe you can get some idea from these. sorry I cant be more elaborate. I dont want to inundate the blog.
Cheers!


ratiox = (90 - (Atn(tempx / tempy) * (180 / 3.1415926535898))) & " deg"
    ratioy = (90 + (Atn(tempx / tempy) * (180 / 3.1415926535898))) & " deg"
    location.Cells("PinX").FormulaForce = "ThePage!PageWidth/2+(" & xcord & " mm*(COS(ThePage!Prop.PanAngle -  " & ratiox & ")))"
    location.Cells("PinY").FormulaForce = "ThePage!PageHeight/2-(" & ycord & " mm*(-SIN(ThePage!Prop.PanAngle + " & ratioy & "))*-SIN(ThePage!Prop.TiltAngle))"
« Last Edit: April 12, 2011, 05:50:58 AM by Visio Guy »

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Visio Animation Template
« Reply #35 on: April 12, 2011, 01:04:20 AM »
np..thx

More interested in the geometry cells of the "table" that rotates.

Playiing with angles just makes the shape rotate on the plane parallel to the computer screen

In the geometry cells, author must be doing some 3D to 2D translations

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Visio Animation Template
« Reply #36 on: April 12, 2011, 05:57:13 AM »
My guess is that the "rotation" becomes and exercise in building rhombi, essentially skewing the rectangle to varying degrees.

The math for maintaining a point along a line from side to side is then fairly simple algebra which can be done in the ShapeSheet with only minor hair-pulling.

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Visio Animation Template
« Reply #37 on: April 12, 2011, 08:08:50 AM »
Sure...simple algebra....but translating that into visio geometry where the angles involved are really cos(omega)*sin(gamma) + sin(omega)*cos(gama) are needed to define where the vertexs go is not simple

Ie if its a fixed rombus or games played with width or height to trick the ....that is simple and fair enough....but to rotate, the trig comes into play.

I need to study June's latest...he may have licked the problem I am curious about

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #38 on: April 12, 2011, 08:10:04 PM »
Guys its been two years or more since I did this, trying to think back and explain the mechanism in your context is my problem though.
I will look deeper into it , but the "trick" is to have the cross hairs ( the grey faint "X") that you see at the begining of the video. the table top is pinned\ glued to the 4 outside end points of the cross hairs.

the 4 X "skirts" of the rotating plane appear and disappear depending on whether their start extremity is more left (or more right) than their end extremity). 

the trig maths generated by the out-of-sight "graphic engine" adjusts the angles of the "cross hairs"

I dont think its distorting a stationary rectangle in this context, also the blue dots\ green lines  are "injected" into their shapeshhet formulas  so that their PIN X PIN Y can track a "oval" trajectory ...the X Y axis of this ovaloid trajectory is influenced again by referencing the the out-of-sight "graphic engine"

The custom controls "PAN LEFT , PAN RIGHT, TILT UP, TILT DOWN, DEFAULT  and XENITH  use VBA macros to drive the "graphic engine".

I remember my issue at the time was trying to figure out how to have a fade to horizon convergence point which would give it even more realism. But this scope for this ran dry. :'(

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #39 on: April 12, 2011, 10:39:59 PM »
snapshots of the graphic engine and the crosshairs shapesheet formulas

cliff50

  • Full Member
  • ***
  • Posts: 215
Re: Visio Animation Template
« Reply #40 on: April 12, 2011, 10:41:02 PM »
sorry ..and this one

lysakowski

  • Newbie
  • *
  • Posts: 1
Re: Visio Animation Template
« Reply #41 on: February 04, 2014, 02:17:55 PM »
I am attempting to get this exampe working in Visio 2013.  No luck.    The controls at the bottom of the drawing do nothing.