Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: jamtart on March 12, 2009, 05:35:49 PM

Title: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 12, 2009, 05:35:49 PM
Another project that I need someone to get me started on. I am just a casual user and doing some dabbling in shapesheets but I have no idea how to get this little project started.
What I visualize is:
phasor A always at 0 degrees and at a certain magnitude
phasor B anywhere from 180 degrees to 100 degrees at a certain magnitude
Phasor C is the addition of these A and B put together, magnitude and angle

This is go be used to show students how various electrical components add together to get a result. Of course there is a lot more than this but this is my starting point.
I have a few pictures attached to better explain what I mean.
Any help on this project is greatly appreciated and the learning I muster from this one will be used for other projects that I think will l work alone the same lines as well.

Thanks
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 12, 2009, 06:11:36 PM
There are several ways to go about this.  But, 1st, do you want to be able to control vector A and vector B, i.e., magnitude & angle?  If so, you could either create custom properties (shape data) and enter the desired values for the two controlling vectors, or, alternatively, add control points to drag the vector "heads" around.

Next, I think I'd make a single shape, otherwise, make it a group.  Single shape requires drawing vector A, open its shapesheet, insert two more geometry sections -- one for each of the other vectors.  You can then use the above mentioned approaches to control vector A and B.  The end point of vector C will be based upon alegbraic / trig functions derived from A and B properties.  This can all be done in the Geometry section of the shapesheet.  The nice thing about the single shape approach is that everything is slaved off a single width/height parameter.  Anyway, that's my initial thought on this.

HTH
Wapperdude
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 12, 2009, 08:22:26 PM
THanks for the reply. Vector A will only change in Magnitude and not the angle, at least not for this project. Vector B will change both.
Not a shapesheet expert but have done some things with it in the past. THanks for the input and I will start working on this one if I can get my students to leave me alone. LOL
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 12, 2009, 10:48:00 PM
Here's a good shapesheet reference:  http://msdn.microsoft.com/en-us/library/ms427031.aspx

One of the things that helps is have both the drawing window and shapesheet open and tiled (menu bar) > Window > Tile.  That way you can watch both windows.  You can make changes in the shapesheet window and see the immediate impact in the drawing window.  For example, you draw vector A, with it selected, open the shape sheet (Window > Show shapesheet).  There are a variety of sections, but scroll down to the Geometry1 section.  The first row probably says "Move to".  Click the X "cell".  In the drawing window, you should see a black square at the beginning of your vector.  Back to the shapesheet, this cell is referred to as Geometry1.X1:  Geometry1 is name of section, X is name of the column, "1", is the 1st row, pretty much like Excel, except columns and rows. 

If you right click in the shape sheet, choose Insert Section & select Geometry.  Now in the shapesheet, there will be a Geometry2 section.  You can use this to draw your 2nd vector.  Add a 3rd geometry section and that'll be your 3rd section.  The single shape approach is simpler to implement, but all three vectors are forced to have the same properties:  color, thickness.

Using the group method, each vector may have its own unique properties, but the construction is a little more involved.

The other thing to note about Visio is that it is "width" based.  Dimensions and coordinates are given in factors of the shape width and shape height.  Lower left corner is (0,0).

I hope this gives you a running start.  Ask questions if you get stumped.  There a lot of knowledgeable contributors on this forum who can help. 


Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 13, 2009, 08:43:54 PM
Maybe my brain is tired from a long session with this group of students but I just can not get this one to work. I am such a newbie today. I have done other projects that I thought were more complex... :(
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 13, 2009, 08:53:02 PM
Not a problem.  Attached has both solutions.  ;D

Right click either shape, then bring up the shape data.  Has enties for magnitude both vectors, and angle for vector B.
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 14, 2009, 03:05:54 PM
 ;D this is great wapperdude! This will get my project off to great start. Today I will attempt to add another phasor that will always be at 90 degrees to the resultant phasor and have a magnitude based upon another external value ( ie 0.006 ohms) and the value of the resultant phasor so the formula I use in class looks something like this: resultant divided by Ohms. Then too I want to be able to add angles and magnitudes to the various phasors that change accordingly. But this gives me a very good start to this one that I suspect will take me some time to get just as I want, but up to learning new things. FYI the class content is about synchronous motors and alternators theory.

Wish me luck, I'm going in.... ::)
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: Visio Guy on March 14, 2009, 07:08:42 PM
Hi Folks,

Have you seen the "Microsoft Office Visio 2007 Chemistry, Mathematics, and Physics" over on Visio Toolbox? There are lots of math-related shapes. I believe that I saw a lot of vector shapes when I browsed them a few months ago. But I can't remember if they are interactive in any way.

You can get them here: http://visiotoolbox.com/academicshapes/Default.aspx

Great to see you guys working on this! I've been wanting to make a set of physics shapes since forever. I used to write physics lecture notes when I was at university. Students would subscribe to them so they could stay home and sleep (then just read my notes later...) If I had five cents for every inclined plane with normal, friction, theta and resultant forces that I have drawn, I'd be rich!
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 14, 2009, 07:25:29 PM
 :o  You didn't live on Elm Street did you?   :-\
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: Visio Guy on March 14, 2009, 07:43:17 PM
Elm street - as in Nightmare on?

Brain is slow, just got back to Munich from Seattle... j e t  l a g...
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 14, 2009, 08:46:42 PM
 ??? hey Visio Guy, i have downloaded many of those educational shapes but all I get is a blank sheet every time. What am I doing wrong. Seems simple enough. I am using Visio 2007 on a Vista laptop.
Back to my little project in the mean time, aurgh......
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: Paul Herber on March 14, 2009, 08:59:07 PM
Download the zip file instead, unzip them into the "My Shapes" folder.


Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 14, 2009, 09:40:23 PM
Nightmare on Elm Street it is.   :P  As in those physics problems, especially friction, gave me nightmares!

Don't think I noticed any vector related items in the Educational download.  May have missed it.
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 14, 2009, 09:57:05 PM
I did not see any vector ones either, also dont see where any zip files are either.
Still plugging away on my original project, trying to expand on wapperdudes work (the colored ones he made) with no success. I may have to give this old brain a rest here soon... ::)
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: Paul Herber on March 14, 2009, 10:05:03 PM
Quote from: jamtart on March 14, 2009, 09:57:05 PM
I did not see any vector ones either, also dont see where any zip files are either.
The 2nd link, "All Shapes.zip"
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 14, 2009, 10:20:00 PM
Ahh, thank you. got them now. There is some awesome stuff there, thank you
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 15, 2009, 03:23:48 PM
Why is this not working for me. I created a new phasor (RED) that i can not go to the same starting point as the others. Then I need to get this new phasor to always be at 90 degrees in front of the Yellow phasor. The new phasor must be equal to the value of the yellow phasor divided by a value that I want to enter into a box on the page somewhere. I thought I was getting a handle on this but then it all fell apart on me. Here is one of the least messed up copies i have...
sure would like to know what i am missing here.
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 16, 2009, 06:28:28 AM
Hey!  Well, couple of pointers to begin with:
1.)  When you grouped, you must have identified the RED phasor 1st, then the group of phasors.  You need to do that in oppositie order.  So, ungroup and then regroup.
2.)  Before you regroup (Oh sure, now he tells me  :o ), set your RED phasor in the approximate location you want, say perpendicular to the BLACK phasor, with the beginning points aligned.  This is more of a convenience thing.
3.)  The math gets to be a little trickier, because of shifted origins.  Rather than try to explain it, here's the update.
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 16, 2009, 11:49:39 AM
Thanks for that info and sample wapperdude. It appears that I have a huge learning curve ahead of me as I had many other ideas to add to this project as it developed. I see that I had better take small steps. I took a look at the math involved and you were not kidding about the math getting a little trickier.
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 16, 2009, 03:42:29 PM
I chose to implement all of this by manipulating the 1D Shape Section entries.  This is a case where Visio uses coordinates rather than width/height to do calculations.  (A 1D shape has no height.)  I chose this approach because it's more intuitively straight forward, and, if you click a sub-shape, the drawn shape coincides with the "selection marks".  There are other approaches, e.g., manipulating the Geomemtry and/or the Shape Transform sections.  However, that's less intuitive since Visio relies on width/length, PinX, PinY, etc.  One other point, the group alignment box doesn't update.  Don't update it.  I did not guard the formulas, and updating will clobber them.   ::)  >:(
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 16, 2009, 05:12:20 PM
I made one small modification for the Red Phasor:
1-D endpoints,
EndX =(Sheet.8!EndX-BeginX)*COS(Sheet.8!Angle-90 deg)/COS(Sheet.8!Angle)+BeginX
I changed the +90 to -90
EndY =(Sheet.8!EndY-BeginY)*SIN(Sheet.8!Angle-90 deg)/SIN(Sheet.8!Angle)+BeginY
I changed the +90 to -90

I see now that when I manipulate the Black or Blue phasor so that the Red phasor SHOULD be at 0 degrees that the red phasor suddenly flips to 180 degrees. However, progress is being made, I think :P
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: Visio Guy on March 16, 2009, 06:38:18 PM
More rain on your parade, or salvation, depending on your perspective:

Vector Calculation Shapes from Junichi Yoda (http://www.geocities.jp/visualcalculation/english/vectorcalc.htm)
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: wapperdude on March 17, 2009, 06:09:35 AM
Gee, I hear music...Oh, the weather outside is frightful...let it rain, .........Who'll stop the rain?  (CCR)

But look at all that we learned!!!
Title: Re: Interactive Phasor (Vector) Visio Shapes
Post by: jamtart on March 29, 2009, 12:49:18 AM
Well I have learned a lot from this exercise but alas I feel that this is just beyond my expertise at this time :'(