Code Red > AutoLISP (Vanilla / Visual)
Arc-length from known radius & chord
DMSS1:
I have a radius of 1326.0
And a chord of 72.0
How can I find the arch length using autolisp?
Thanks,
DMSS1
LE:
Welcome;
I think there are a lot of geometry formulas out there, here is what I had used"
--- Code: ---(setq arcAngle
(* (atan (/ (/ (sqrt (- (expt radius 2) (expt (/ chord 2.0) 2))) 2.0) chord))
2.0))
(setq arcLength (* (* (/ (/ (* arcAngle 180.0) pi) 360.0) (* pi 2)) radius))
--- End code ---
I did a quick translation to my formulas I have in C++, into autolisp, hope they are right (not tested)
Update: Removal of the C++ code - not needed here.
DMSS1:
Thanks Esquivel!
I will try-it-out.
The only part I don't understand is "pow" (is this POINT-ON-WORLD coords?).
LE:
--- Quote from: DMSS1 on July 31, 2006, 01:34:54 PM ---The only part I don't understand is "pow" (is this POINT-ON-WORLD coords?).
--- End quote ---
No no.... the commented code is in C++.... I just posted as reference.
DMSS1:
I tried it out, but got the wrong answer.
Radius=1326.0 of a circle.
Chord=72.0
Find the length of arc with a 72.0 chord on the circle.
My dwg says the angle bettween the intersections=3.11146537°
And the arc length=72.00884796
I drew a circle, r=1326.0
Then drew a line 72.0
Moved the middle of the line, to the top quadrant of the circle.
Then drew a line verticaly to the inside of circle on each side.
Drew a line from inersection to intersection (this should produce a 72.0 straight line across the to of the circle).
Trim the big circle with the new horizontal line.
Listing the arc = length above.
Did I do smething wrong?
Thanks,
DMSS1
Navigation
[0] Message Index
[#] Next page
Go to full version