Author Topic: Arc-length from known radius & chord  (Read 3647 times)

0 Members and 1 Guest are viewing this topic.

DMSS1

  • Guest
Arc-length from known radius & chord
« on: July 31, 2006, 01:06:30 PM »
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

  • Guest
Re: Arc-length from known radius & chord
« Reply #1 on: July 31, 2006, 01:24:45 PM »
Welcome;

I think there are a lot of geometry formulas out there, here is what I had used"

Code: [Select]
(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))

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.
« Last Edit: July 31, 2006, 01:47:09 PM by Esquivel »

DMSS1

  • Guest
Re: Arc-length from known radius & chord
« Reply #2 on: July 31, 2006, 01:34:54 PM »
Thanks Esquivel!
I will try-it-out.

The only part I don't understand is "pow" (is this POINT-ON-WORLD coords?).

LE

  • Guest
Re: Arc-length from known radius & chord
« Reply #3 on: July 31, 2006, 01:37:12 PM »
The only part I don't understand is "pow" (is this POINT-ON-WORLD coords?).

No no.... the commented code is in C++.... I just posted as reference.

DMSS1

  • Guest
Re: Arc-length from known radius & chord
« Reply #4 on: July 31, 2006, 01:57:05 PM »
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


Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Arc-length from known radius & chord
« Reply #5 on: July 31, 2006, 02:08:43 PM »
I didn't look at what Luis posted, but here's what I have in my toolbox:
Code: [Select]
(defun arclen_rc (r c / halfdelta)
  (setq halfdelta (atan (/ (/ c 2.0) (sqrt (- (expt r 2) (expt (/ c 2.0) 2))))))
  (* (* halfdelta 2.0) r)
  )

DMSS1

  • Guest
Re: Arc-length from known radius & chord
« Reply #6 on: July 31, 2006, 02:34:45 PM »
Thanks Jeff_m,

Works great!

Swamp Rat...  That use to be one of my CB-Handles when the CB-Radio was so popular.


Again,
Thanks!
DMSS1

Dinosaur

  • Guest
Re: Arc-length from known radius & chord
« Reply #7 on: July 31, 2006, 02:39:15 PM »
I have not found the chord length to be a very precise part of a curve definition, especially when there are only two parameters given to solve a curve.  I have tried various combinations of parameters in a curve solver program and the various methods that accept the chord as part will yield significantly different solutions.

LE

  • Guest
Re: Arc-length from known radius & chord
« Reply #8 on: July 31, 2006, 02:50:45 PM »
I didn't look at what Luis posted, but here's what I have in my toolbox:
Code: [Select]
(defun arclen_rc (r c / halfdelta)
  (setq halfdelta (atan (/ (/ c 2.0) (sqrt (- (expt r 2) (expt (/ c 2.0) 2))))))
  (* (* halfdelta 2.0) r)
  )

Thank you Jeff;

I am stuck into these new languages... that I simple lost my abilities on lisp  :-( - I must need to be out of this forum - start to get dangerous by posting lisp code here....  :-(

Sorry about that.
Luis