Sorry, an error occurred while loading the content.
Browse Groups

• I m tackling an XP command involving arcs, and I m wondering if anyone can answer the following questions: - Is there an easy way to get a point along a
Message 1 of 4 , Jul 1, 2000
View Source
I'm tackling an XP command involving arcs, and I'm wondering
if anyone can answer the following questions:
- Is there an easy way to get a point along a specified
arc, i.e. is there a function that takes an GARC2
structure and a parameter T between 0 and 1, and
returns the point corresponding to the given T on the
given arc?
- How would one utilize the toolkit to go about deriving
an arc that fits three given points? I'm trying to
do something similar to what the ARCB command does in
CC2, and I'm assuming that there is a toolkit function
that fits an arc to three given points, but I can't
find it.

Thanks as always!
Christopher Golden
golden@...
• Hi Chris, ... There are several ways to do this. Here is two of them: 1. Do it yourself. GARC2 TheArc; float T; // 0
Message 1 of 4 , Jul 3, 2000
View Source
Hi Chris,

>I'm tackling an XP command involving arcs, and I'm wondering
>if anyone can answer the following questions:
>- Is there an easy way to get a point along a specified
> arc, i.e. is there a function that takes an GARC2
> structure and a parameter T between 0 and 1, and
> returns the point corresponding to the given T on the
> given arc?

There are several ways to do this. Here is two of them:

1. Do it yourself.

GARC2 TheArc;
float T; // 0 <= T <= 1
GPOINT2 Pt; // Result

PConv(TheArc.Circle.Center.x, TheArc.Circle.Center.y, TheArc.Circle.Radius, TheArc.SAng+TheArc.AngW*T, &Pt);

2. Use the T conversion functions.

GARC2 TheArc;
float T; // 0 <= T <= 1
GPOINT2 Pt; // Result
ARC2 Arc={sizeof(ARC2), ET_ARC2};

Arc.Arc=TheArc;

ECalPt2((pENTREC)&Arc, T, &Pt);

>- How would one utilize the toolkit to go about deriving
> an arc that fits three given points? I'm trying to
> do something similar to what the ARCB command does in
> CC2, and I'm assuming that there is a toolkit function
> that fits an arc to three given points, but I can't
> find it.

There is (to my knowledge) no function that will do all of it for you. However by using PConv, Dist2P, Angle and IntL2 you will get ride of the trig and only work out the geometry.

I have define some Ex functions (PConvEx, Dist2PEx etc) that works on GPOINT2:s rather than two floats. I don't know if it is included in the toolkit distribution or not. If not let me know and I'll send you the files. They also include some glue routines not provided in the toolkit.

Peter
• Obvious but...Before performing your line calculations you must also assure that the three points do not lie on a single line or your equations will have an
Message 1 of 4 , Jul 3, 2000
View Source
Obvious but...Before performing your line calculations you must also assure
that
the three points do not lie on a single line or your equations will have an
infinite number of solutions - all for very "flat" elipses ;^)

Bruce

-----Original Message-----
From: Peter Olsson [mailto:peter@...]
Sent: Monday, July 03, 2000 11:15 AM
To: cc2-dev-l@egroups.com
Subject: [cc2-dev-l] Re: XP toolkit: questions about arcs

Hi Chris,

>I'm tackling an XP command involving arcs, and I'm wondering
>if anyone can answer the following questions:
>- Is there an easy way to get a point along a specified
> arc, i.e. is there a function that takes an GARC2
> structure and a parameter T between 0 and 1, and
> returns the point corresponding to the given T on the
> given arc?

There are several ways to do this. Here is two of them:

1. Do it yourself.

GARC2 TheArc;
float T; // 0 <= T <= 1
GPOINT2 Pt; // Result

PConv(TheArc.Circle.Center.x, TheArc.Circle.Center.y, TheArc.Circle.Radius,
TheArc.SAng+TheArc.AngW*T, &Pt);

2. Use the T conversion functions.

GARC2 TheArc;
float T; // 0 <= T <= 1
GPOINT2 Pt; // Result
ARC2 Arc={sizeof(ARC2), ET_ARC2};

Arc.Arc=TheArc;

ECalPt2((pENTREC)&Arc, T, &Pt);

>- How would one utilize the toolkit to go about deriving
> an arc that fits three given points? I'm trying to
> do something similar to what the ARCB command does in
> CC2, and I'm assuming that there is a toolkit function
> that fits an arc to three given points, but I can't
> find it.

There is (to my knowledge) no function that will do all of it for you.
However by using PConv, Dist2P, Angle and IntL2 you will get ride of the
trig and only work out the geometry.

I have define some Ex functions (PConvEx, Dist2PEx etc) that works on
GPOINT2:s rather than two floats. I don't know if it is included in the
toolkit distribution or not. If not let me know and I'll send you the files.
They also include some glue routines not provided in the toolkit.

Peter

------------------------------------------------------------------------
Free Worldwide Calling with Firetalk!
Click Here:
http://click.egroups.com/1/5481/0/_/373793/_/962640745/
------------------------------------------------------------------------

To Post a message, send it to: cc2-dev-l@...
To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...
• If you use IntL2 to find the center point it will return FALSE if there isn t any well defined intersection. Which would be the case when the points are
Message 1 of 4 , Jul 4, 2000
View Source
If you use IntL2 to find the center point it will return FALSE if there isn't any well defined intersection. Which would be the case when the points are located on the same line. That way you don't need to perform any extra test. :)

Peter

-----Original Message-----
From: Bruce A. Carson <bac@...>
To: cc2-dev-l@egroups.com <cc2-dev-l@egroups.com>
Date: Monday, July 03, 2000 11:10 PM
Subject: RE: [cc2-dev-l] Re: XP toolkit: questions about arcs

>Obvious but...Before performing your line calculations you must also assure
>that
>the three points do not lie on a single line or your equations will have an
>infinite number of solutions - all for very "flat" elipses ;^)
>
>Bruce
>
>-----Original Message-----
>From: Peter Olsson [mailto:peter@...]
>Sent: Monday, July 03, 2000 11:15 AM
>To: cc2-dev-l@egroups.com
>Subject: [cc2-dev-l] Re: XP toolkit: questions about arcs
>
>
>Hi Chris,
>
>>I'm tackling an XP command involving arcs, and I'm wondering
>>if anyone can answer the following questions:
>>- Is there an easy way to get a point along a specified
>> arc, i.e. is there a function that takes an GARC2
>> structure and a parameter T between 0 and 1, and
>> returns the point corresponding to the given T on the
>> given arc?
>
>There are several ways to do this. Here is two of them:
>
>1. Do it yourself.
>
>GARC2 TheArc;
>float T; // 0 <= T <= 1
>GPOINT2 Pt; // Result
>
>PConv(TheArc.Circle.Center.x, TheArc.Circle.Center.y, TheArc.Circle.Radius,
>TheArc.SAng+TheArc.AngW*T, &Pt);
>
>2. Use the T conversion functions.
>
>GARC2 TheArc;
>float T; // 0 <= T <= 1
>GPOINT2 Pt; // Result
>ARC2 Arc={sizeof(ARC2), ET_ARC2};
>
>Arc.Arc=TheArc;
>
>ECalPt2((pENTREC)&Arc, T, &Pt);
>
>>- How would one utilize the toolkit to go about deriving
>> an arc that fits three given points? I'm trying to
>> do something similar to what the ARCB command does in
>> CC2, and I'm assuming that there is a toolkit function
>> that fits an arc to three given points, but I can't
>> find it.
>
>
>There is (to my knowledge) no function that will do all of it for you.
>However by using PConv, Dist2P, Angle and IntL2 you will get ride of the
>trig and only work out the geometry.
>
>I have define some Ex functions (PConvEx, Dist2PEx etc) that works on
>GPOINT2:s rather than two floats. I don't know if it is included in the
>toolkit distribution or not. If not let me know and I'll send you the files.
>They also include some glue routines not provided in the toolkit.
>
>Peter
>
>
>------------------------------------------------------------------------
>Free Worldwide Calling with Firetalk!
>Click Here:
>http://click.egroups.com/1/5481/0/_/373793/_/962640745/
>------------------------------------------------------------------------
>
>To Post a message, send it to: cc2-dev-l@...
>To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...
>
>
>------------------------------------------------------------------------
>Life's too short to send boring email. Let SuperSig come to the rescue.
>http://click.egroups.com/1/6137/0/_/373793/_/962658599/
>------------------------------------------------------------------------
>
>To Post a message, send it to: cc2-dev-l@...
>To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...
Your message has been successfully submitted and would be delivered to recipients shortly.
• Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
• Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.