Author Topic: Arc direction?  (Read 5528 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
Re: Arc direction?
« Reply #15 on: May 30, 2006, 09:01:55 PM »
Thanks, I noticed that let me see if I can fix it.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Arc direction?
« Reply #16 on: May 30, 2006, 09:20:01 PM »
Alan, the only time I can get the result you do is when my point of selection of the tangent is on the 'downhill' side of the line from the perpendicular point, which is how I thought it would work......
FWIW, here is the original pic that the OP posted of what they are trying to do.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Arc direction?
« Reply #17 on: May 30, 2006, 09:22:26 PM »
Jeff, I get that result no matter where I select on the line. Very curious?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Arc direction?
« Reply #18 on: May 30, 2006, 09:26:24 PM »
on the mean time, here are some formulas I did for one of my routines:

Arc angle
Code: [Select]
double arcAngle = ( 2.0 * atan( chord / 2.0 / sqrt(( pow(r,2) - pow(( chord / 2.0 ),2) ))) );

Arc length
Code: [Select]
#define PI 3.141592653589793238462643383279502884197169399375105820974944592308
#define PI360 6.283185307179586476925286766559
double arcLength = ((( ( arcAngle * 180.0 ) / PI ) / 360.0 ) * PI360 * r );

I do not have them as a lisp  :-(

pow() is the same as expt function in lisp

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Arc direction?
« Reply #19 on: May 30, 2006, 09:38:02 PM »
Jeff, i would have expected these results, no?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Arc direction?
« Reply #20 on: May 30, 2006, 09:43:25 PM »
Jeff & Luis,
What happens when you use the following example with the routine Luis provided?
PS line is 25 or so units long.

Now I did the test and is running just fine.