astro_girl_690
Dec 2nd, 2006, 09:59 PM
Hey guys! Am hoping some one might be able to shed some light on what I suspect is a fairly simple code problem
involving geometry.
I'm an intermediate level VB coder, but my math skills are so so.
So; :)
What I'm trying to do is just this;
Three points on a circle occur at different degrees. These points can be any degree and will vary. I want to find the
ANGLE of degree BETWEEN each point and its neighbour when the three points are viewed as a triangle. For instance;
Three points are generated ;
x = 49 degrees
y = 97 degrees
z = 311 degrees
Lets store the degree points in the above variables; x,y,z
The circle diameter is fixed at 10 units of measure, lets say we are using centimeters.
I want to know what the ANGLE of degree BETWEEN ;
Y_X_Z
Z_Y_X
Y_Z_X
Where the middle variable in the above represents the apex, zenith point of triangle, or the angle between the left and
right degree points
Manually, if I drew this out on paper and used a protractor to measure directly I'd find the degrees to work out as;
Y_X_Z
---------------------------------------
97-49-311 = 108 degrees
Z_Y_X
---------------------------------------
311-97-49 = 48 degrees
Y_Z_X
---------------------------------------
97-311-49 = 24 degrees
BUT how would I CODE this? I want to be able to enter ANY degree value on a circle for any of X,Y,Z.
Also, I'd like to be able to compute automatically the LENGTH of each triangle leg, each of the three lines
making up the triangle.
Importantly, I need to be able to get the angle and line length dimensions for triangles that do not neccessarily
intersect the circle center, radius at all, hence the above example of degrees on a circle of 49, 97 and 311 degrees,
this forms a triangle that does not intersect the circles center.
Can anyone help with some code snippets and hopefully especially any math formulas to derive these sorts of things?
I am familiar with trig functions like AAA, ASA, etc... but this dopes not seem to be what I am looking for since
I am working with a scenario where both triangle angles AND sides are unknowns - all that is known is the three
degree points on the circle that would form the triangle.
Thanks guys!!!
:)
involving geometry.
I'm an intermediate level VB coder, but my math skills are so so.
So; :)
What I'm trying to do is just this;
Three points on a circle occur at different degrees. These points can be any degree and will vary. I want to find the
ANGLE of degree BETWEEN each point and its neighbour when the three points are viewed as a triangle. For instance;
Three points are generated ;
x = 49 degrees
y = 97 degrees
z = 311 degrees
Lets store the degree points in the above variables; x,y,z
The circle diameter is fixed at 10 units of measure, lets say we are using centimeters.
I want to know what the ANGLE of degree BETWEEN ;
Y_X_Z
Z_Y_X
Y_Z_X
Where the middle variable in the above represents the apex, zenith point of triangle, or the angle between the left and
right degree points
Manually, if I drew this out on paper and used a protractor to measure directly I'd find the degrees to work out as;
Y_X_Z
---------------------------------------
97-49-311 = 108 degrees
Z_Y_X
---------------------------------------
311-97-49 = 48 degrees
Y_Z_X
---------------------------------------
97-311-49 = 24 degrees
BUT how would I CODE this? I want to be able to enter ANY degree value on a circle for any of X,Y,Z.
Also, I'd like to be able to compute automatically the LENGTH of each triangle leg, each of the three lines
making up the triangle.
Importantly, I need to be able to get the angle and line length dimensions for triangles that do not neccessarily
intersect the circle center, radius at all, hence the above example of degrees on a circle of 49, 97 and 311 degrees,
this forms a triangle that does not intersect the circles center.
Can anyone help with some code snippets and hopefully especially any math formulas to derive these sorts of things?
I am familiar with trig functions like AAA, ASA, etc... but this dopes not seem to be what I am looking for since
I am working with a scenario where both triangle angles AND sides are unknowns - all that is known is the three
degree points on the circle that would form the triangle.
Thanks guys!!!
:)