kalai 发表于 2022-7-6 09:27:38

find tan(angle)

how to find tan of angle in lisp
my code
 
tanA= x/y
i know Aand x
how to get y   ?
help me.

MSasu 发表于 2022-7-6 09:49:20

So, you know the angle and the oposite leg and look for adjacent leg?
 

(setq theY (/ theX (/ (sin theAngle) (cos theAngle))))
 
Regards,
Mircea

kalai 发表于 2022-7-6 10:09:58

thanks,
 
i did try it. but if angle is greater than 90 then how to find y?

MSasu 发表于 2022-7-6 10:20:50

The above trigonometric formula works only in right-angled triangles - for your case need to split your current triangle in right-angled triangles and perform calculations in each to get the appropriate formula.
Can you post a sketch of your case?
 
Regards,
Mircea

MSasu 发表于 2022-7-6 10:39:38

Or, if you know the size of triangle's third leg may use the cosine theorem.
 
Regards,
Mircea
页: [1]
查看完整版本: find tan(angle)