Jump to content

I am looking for a theorum


meshsmooth

Recommended Posts

I'll do the more intuitive solution to this, though there is a more analytical one:

Just a quick recap, why we ended with the cyclic quadrilateral:

Check Brahmagupta's formula on mathworld, which allows to calulate the area of any given quadrilateral:

Brahmagupta's Formula

Now, we want to maximize the area, and if we look at the formula we instantly see ... :unsure: ... the part with

(s-a)(s-b)(s-c)(s-d)

is always gonna be positive and it's value gets decreased by the

abcd cos^2 { 1/2 (alpha + beta) }

Note that the points A and B get connected by a diagonal.

We can't do anything about the given length anyhow, so we try to set the abcd * cos^2 {...} to zero. Since we can't do anything about abcd, we're left with the angles. If we find a solution to cos {...} = 0, we found a solution to cos^2 {...} = 0, since

cos{} * cos{} = 0 * 0 = 0

This leads us to the conclusion that alpha + beta must be 180

Edited by TheDunadan
Link to comment
Share on other sites

That's very cool Jens, thanks! :)

Just thinking out loud here, but this makes me think that if you then wanted to construct the points procedurally, you could first pick a center and a plane (say {0,0} on XY), draw your first point at {r,0}, and then find the other points by accumulating angular increments; where each increment maps to each successive chord length (the lengths of the sides abcd).

So it would go something like this:

1. Use your derivation to get the circumradius r.

2. First point goes to {r,0}. Angle accumulator ang gets initialized to 0.

3. The length of each chord c (which stands for each quad side abcd) relates to an angle in the circumcircle as: theta = 2*asin(c/(2*r)), and map to the concrete coordinates {r*cos(ang), r*sin(ang)} (where ang represents the accumulated theta's).

4. So the update for each quad-point {Pn, n>0} would be:

c = length_of_current_side;

ang += 2 asin(c/2r);

x' = r * cos(ang);

y' = r * sin(ang);

... and repeat...

5. Transform to final location, size, etc..

... did I screw up somewhere? Could it be made simpler still? :unsure:

Cheers!

Link to comment
Share on other sites

The reason is I am wanting to make what could be described as a IK solver of sorts that will take 3 links and bend them in the direction of 2 vectors. But first i need to solve the problem on a flat quadrilateral and to do that i need a starting point. I have the starting point the end point and one vector point at each end that pulls the sides about. the 3 side lengths will be inputted into the equation and the distance between the start and end points (but not exceeding the sum of the 3 sides) is used as the 4th side length. so the next problem is how to make the natural angles for the quadrilateral that is created between the points. It pooped into my head, the largest area quadrilateral would be it. After much searching i found the PDF and that gave me the key words to find the other.

Rotate the quadrilateral to be in the plain between the 2 end points and the average of the 2 vectors. flatten the 2 vectors into the 2d plain average them and push the quadrilateral to reflect that direction of the vector.

Then to illustrate this i need an example of a piece of paper an envelope is good for this... cut it or fold it into a trapezoid then fold it on the diagonals between the corners, make these folds over and again so they become an easy bend. now grab the angles trapezoid sides and twist them out of plain. As you twist one fold will take precedence now try to hold the amount of twist and push the fold so it pops so the other fold takes precedence. and now the twisting happens of that axes.

This is kind of what what I will do with the 2d quadrilateral I will rotate one point at a time on the diagonals axes in the direction of the vector that is pulling it.

This isn't perfect but will service for what i want to use it for... a spine. I could make the

Link to comment
Share on other sites

I found it! at http://mathworld.wolfram.com/CyclicQuadrilateral.html But it didnt jump out at me rite away

c4img1454.gif

p = c4img1459.gif

They never say how to find any angles in the quad but they do tell you how to find the diagonal lengths so then you have 3 sides of a triangle and then can find all the angles with the law of cosine.

All in all I guess I lent some maths but probably more than the actual bits I did learn it was the general getting my head into that place where the maths is at. Next I will push the quad off plane to point at 2 vectors so I have the bases for my spine, make an object OT that is a box hinge and get some of this into my fingers. Oh and by the way inst that a god awful way of lettering the angles, the sides are anticlockwise but the angles are in some sort opposite configuration. I would prefer clockwise but at least keep to a standard way

Link to comment
Share on other sites

I found it! at http://mathworld.wolfram.com/CyclicQuadrilateral.html But it didnt jump out at me rite away

13966[/snapback]

But...but...but... Robert; that's exactly the material that Jens used to derive the radius.... (the radius of the circle that encloses/circumscribes the cyclic quad)... and then I gave you a method to interpret the side lengths as chords which in turn give you all the angles and each point position..... I'm confused... :blink:

Link to comment
Share on other sites

The point is it took a while for me to understand what the hell was going on. I am on my way to getting my head int the rite head space. and the example that was provided wasent exzactly what i was looking for so it confused me. only after I understood more coud i see it for what it was.

It is like something a monk would say.

:blink:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...