Grasshopper

algorithmic modeling for Rhino

I'm sure that there is a trigonometric/mathematical solution to the attached image...  I tried to derive it but I'm afraid my brain's just too small... Currently I'm working around this by just building the inner circles to a diameter of 1, finding the outer diameter of the resulting circumscribed circle and then scaling everything up or down...  Works, but not an elegant solution...

TIA, --Mitch

Views: 1019

Replies to This Discussion

Proof is coming shortly.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

This is how I solved it:

  1. First off we draw a polygon with the same radius R as the circle. It's easy to construct this polygon, you don't need any equations for it.
  2. The points on the corners of this polygon are L units apart where L = |PQ|. Again, you can measure this or -if you want- you can solve it mathematically.
  3. As the polygon is scaled down to zero at the circle center, the points P and Q move linearly inwards to P' and Q'. We need to scale the polygon in such a way that |P'Q'| is twice as large as |PP'|.
  4. This will result in two linear equations that both depend on the same variable, lets' call it f for scale factor. When f=1.0 the polygon has it's origin length, when f=0.0 the polygon has fully collapsed onto M.
  5. In maths notation:
      |PP'| = R * (1-f)
      |P'Q'| = L * f
  6. Now equate them to each other:
      2*|PP'||P'Q'|
    or
      2 * (R * (1 - f)) = L * f
  7. Solve for f and you get:
      f = (2 * R) / (L + 2 * R)

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Or with the intercept theorem, using David's notations:

|MP'| / |MP| = |P'Q'| / |PQ|

let say r=radius of inside circles,  and L = |PQ|

  so |MP'|= R-r, |MP|=R and |P'Q'|= 2*r

=> (R-r) / R = 2*r/L

=>...

=> r = R*L / (2*R+L)

Thanks for another approach!

--Mitch

Thanks David!  You da man!  (of course you know that...)

--Mitch

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service