Lost In Space: Angle, Bulge ...



Angle, Bulge ...

Here is some thought about Angle and Bulge
Angle,
DTR, RTD,
0 to 360,
equal 10 = 370
normalize
plus, minus
equal with direction
equal without direction: 20 = 200
bulge
from bulge, start point, end point -> center point, radius, start angle, end angle
from center point, radius, start angle, end angle -> bulge, start point, end point

1. in ObjectARX:
a. from bulge
double bulge=pline_nodes_[position].getBulge();
gePoint pt1, pt2, pt3;

getPointAt(position, pt1);
getPointAt(position+1, pt3);

geVector vSeg=pt3-pt1, vPerp=vSeg.crossProduct(normal_);

pt2=pt3.midPoint(pt1)+0.5*bulge*vPerp;
arc=geArc(pt1, pt2, pt3);

b. from Angle To Bulge
double PI = 4 * atan(1);

diffAngle = Endangle - Startangle;

if(diffAngle < 0)
{
diffAngle = diffAngle + 2 * PI;
bulge = tan( diffAngle / 4) * -1;
}
else
{
bulge = tan( diffAngle / 4) ;
}
« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

0 Comments:

Post a Comment