Author Topic: Trapezoid question  (Read 931 times)

0 Members and 1 Guest are viewing this topic.

paulmcz

  • Newt
  • Posts: 179
Re: Trapezoid question
« Reply #15 on: October 06, 2005, 06:34:49 pm »
Draw a line any length - base line
from one end say left draw a circle rad @ half the line length
from same end draw a line "A" at 60 deg to base line passing over circle
from intersecting point draw a line "B" parralell to base line
mirror "A" about mid point of base line
trim overlaps and thats it

Baseline length is given (w) as well as height (h). Angle is not necessarily 60 deg (see second picture above). You are describing the case where nothing is given, except angle 60 deg.

CarlB

  • Guest
Re: Trapezoid question
« Reply #16 on: October 07, 2005, 10:42:29 am »
Reading the question more closely this time..ready to take anothe stab at it;

Look at one of the triangles. Right triangle.  Call the hypotenuse L, height H, then the base is (W-L)/2.
Use the pythagorean theorum - the sum of the squares of the legs equals the square of the hypotenuse.  A little rearrangement gives you:

3L^2 +2LW - H^2 - W^2 = 0

Hey that's one equation, one unknown (L), should be solveable! And it's almost in the form of the quadratic equation,
ax^2 + bx + c = 0, which has the solution (going by memory here)...
x=[-b +/- sqrt(b^2 - 4ac]/2a

Now who's up to doing the math?

paulmcz

  • Newt
  • Posts: 179
Re: Trapezoid question
« Reply #17 on: October 07, 2005, 01:03:22 pm »
Reading the question more closely this time..ready to take anothe stab at it;

Look at one of the triangles. Right triangle.  Call the hypotenuse L, height H, then the base is (W-L)/2.
Use the pythagorean theorum - the sum of the squares of the legs equals the square of the hypotenuse.  A little rearrangement gives you:

3L^2 +2LW - H^2 - W^2 = 0

Hey that's one equation, one unknown (L), should be solveable! And it's almost in the form of the quadratic equation,
ax^2 + bx + c = 0, which has the solution (going by memory here)...
x=[-b +/- sqrt(b^2 - 4ac]/2a

Now who's up to doing the math?


CarlB, I don’t think that this will get you there.
You'll be surprised how simple this problem is. There is no need for quadratic equation here. Just simple trigonometry is needed, if you want to solve it through the math.
Graphical solution is much easier, though. It takes less than a minute to draw it on the AutoCAD with absolute precision. You don’t even need the CAD to draw this very accurately.

CarlB

  • Guest
Re: Trapezoid question
« Reply #18 on: October 07, 2005, 01:40:42 pm »
Bob, it's got to get me there, it's pure math!

(but I messed up in my first expression after substituting in the pythagorean eqn.)

So I followed through on the math, got:

L=[-W + 2 x sqrt (W^2 + 3H^2)]/3

Seemed to check out for an example drawin in CAD.

I'd love to see how to solve it graphically  :)

ronjonp

  • King Gator
  • Posts: 4244
Re: Trapezoid question
« Reply #19 on: October 07, 2005, 01:52:03 pm »
Here is my not so elegant solution :-):
Code: [Select]
(defun C:trap (/ pt ang len line1 line2 line3)
  (setq pt (getpoint "\n Pick start point: "))
  (setq len (getstring "\n Enter length: "))
  (setq ang (getstring "\n Enter angle: "))
  (setq line1 (strcat "@" len "<" ang))
  (setq line2 (strcat "@" len "<0"))
  (setq line3 (strcat "@" len "<-" ang))
  (command "_pline" pt line1 line2 line3 "close")
)

Windows 8 x64 - AutoCAD 2014

Dell Optiplex 9010 / Intel I7-3770 / 8GB RAM / NVidia 550ti

paulmcz

  • Newt
  • Posts: 179
Re: Trapezoid question
« Reply #20 on: October 07, 2005, 02:08:29 pm »
Here is my not so elegant solution :-):
Code: [Select]
(defun C:trap (/ pt ang len line1 line2 line3)
  (setq pt (getpoint "\n Pick start point: "))
  (setq len (getstring "\n Enter length: "))
  (setq ang (getstring "\n Enter angle: "))
  (setq line1 (strcat "@" len "<" ang))
  (setq line2 (strcat "@" len "<0"))
  (setq line3 (strcat "@" len "<-" ang))
  (command "_pline" pt line1 line2 line3 "close")
)

Ronjonp, we don't know the angle. Just "w" and "h" (see the picture in the first post)

paulmcz

  • Newt
  • Posts: 179
Re: Trapezoid question
« Reply #21 on: October 07, 2005, 02:20:16 pm »
Bob, it's got to get me there, it's pure math!

(but I messed up in my first expression after substituting in the pythagorean eqn.)

So I followed through on the math, got:

L=[-W + 2 x sqrt (W^2 + 3H^2)]/3

Seemed to check out for an example drawin in CAD.

I'd love to see how to solve it graphically  :)

You got it CarlB!
Here are the solutions I found.
Thanks for the ride.
Paul.

Kerry

  • Mesozoic Relic
  • Needs a day job
  • Posts: 9676
  • class keyThumper<T>:ILazy<T>
Re: Trapezoid question
« Reply #22 on: October 08, 2005, 08:45:21 am »
Nice Solution Paul .. Well done Carl
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline : absolutely none at all.

--> Donate to TheSwamp <--