Author Topic: Articulated Line  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

Hey Ken

  • Full Member
  • ***
  • Posts: 158
  • Just This Guy
    • Ken Krawchuk, Libertarian for Pennsylvania Governor
Re: Articulated Line
« Reply #15 on: July 11, 2018, 07:38:55 AM »
Wapperdude:

   You cannot imagine how big a smile I had when I saw those arrowheads tracking so nicely with the line segments.  But I can bet you can imagine my bewilderment when I looked at the shapesheet!  And my degree is in Physics, so you’d think I’d be more comfortable with all the trig.  It’ll take some doing before I figure it all out, but at least the solution is there.  An interesting problem for sure, and it appears you’ve spent as much time on it as I have.  You can get some sleep, now.  ;- )

   - Ken

Ken V. Krawchuk
Libertarian for Pennsylvania Governor
KenK4Pa.com

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3187
  • Ideas Visio-lized into solutions
Re: Articulated Line
« Reply #16 on: July 11, 2018, 09:21:32 AM »
The joys of being retired.  I don't have a steady job that dictates my time schedule.  But having been an engineer, doing circuit design (custom IC's) for 42 years, there's still this need to solve intriguing problems.  This one was fascinating because of the sliding arrowheads.  Your approach gave me enough "outside the box" perspective to tackle this. 

I'm going to repost the solution here, I changed the angular "results" from "Direct" and "Calculated" to "DirX" and "DirY" as being more meaningful.  That is, if "DirX", then the AH2 control's Xpos is derived directly from its actual location, and the Ypos is calculated.  But, if "DirY" is the result, than the Ypos is derived directly from location and the Xpos is calculated.  The results could have been more easily "1" and "0", but that's not very instructive.  However, using the Boolean results would have eliminated the "Strsame" function in the AH2 control cells.

Another FYI note:  for the Controls.AH2, the direct calculation uses the setatref functions, and the calculated position calls an User.CalcAHD2 formula.

Wapperdude
« Last Edit: July 11, 2018, 09:28:58 AM by wapperdude »
Visio 2007 Std