tan() - gives incorrect result
-
I am using the tan() function to rotate a coordinate the spacing between each increment (arc)are not equal Does anybody know why this is happening? thank you Simon
-
I am using the tan() function to rotate a coordinate the spacing between each increment (arc)are not equal Does anybody know why this is happening? thank you Simon
How are you using it (please post the code)? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
How are you using it (please post the code)? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]here goes, all this for the first quadrant /////////////////////////// x = 0; y = 12; degreeIncrement = 0; for (---- about 30 times){ x = tan(degreeIncrement) * 12; ------>as 12 is the pyth theory (c square) ------> for the x position increment y' = (12.0 * 12.0) - (x * x); -------> then square root y y = sqrt(y); plot line from origin to x,y + position on screen m_degreeIncrement += 0.2; ------> or what ever value } end loop ////////////// Hope this helps, I am also aware of the cos, and sin functions formula Thanks Simon
-
here goes, all this for the first quadrant /////////////////////////// x = 0; y = 12; degreeIncrement = 0; for (---- about 30 times){ x = tan(degreeIncrement) * 12; ------>as 12 is the pyth theory (c square) ------> for the x position increment y' = (12.0 * 12.0) - (x * x); -------> then square root y y = sqrt(y); plot line from origin to x,y + position on screen m_degreeIncrement += 0.2; ------> or what ever value } end loop ////////////// Hope this helps, I am also aware of the cos, and sin functions formula Thanks Simon
Having a hard time following the logic on your math. You're multiplying the tangent by 12, which appears to be the length of the hypotenuse since you using it later in what looks like the Pythagorean theorem. Since tangent has no relation to the hypotenuse, I'm not sure why you're doing that. (tangent = opposite / adjacent). I'm not sure what you're trying to do, but if it's drawing "spokes" (like a wagon wheel) from the origin to various angles, then why wouldn't you just use something like: x = length * cos(currentAngle) y = length * sin(currentAngle) And sweep thru the angles you want to cover?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins