# Newbie - trig problem

**URL:** <https://forum.kirupa.com/t/newbie-trig-problem/269948>\
**Category:** programming\
**Created:** [September 3, 2008, 2:03pm UTC](https://forum.kirupa.com/t/newbie-trig-problem/269948 "2008-09-03T14:03:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerosum](https://avatars.discourse-cdn.com/v4/letter/z/b2d939/32.png) [@zerosum](https://forum.kirupa.com/u/zerosum)\
**Post date:** [September 3, 2008, 2:03pm UTC](https://forum.kirupa.com/t/newbie-trig-problem/269948/1 "2008-09-03T14:03:55Z")

</div>

Hi there,

Please help a humanist lost in trigonometry!! :}

I am trying to do the following: a class that draws a triangle onscreen when the mouse is clicked. The starting point would be the mouseX, mouseY, and I will give the angle when the class is instantiated.

So, I want to draw a triangle on the fly, knowing the initial x,y, the angle, and the length of the sides - how do I do that?

Sorry for the really lame question - I know the solution is easy, but I haven’t had math in 20 years (ghasp!) and a bit of the day has gone trying to figure this one out.

(oh, if it helps, the triangle will always be isosceles (I am trying to create a “radar” type of cone)).

Thanks!
