I need to generate a triangle that will be able to be user controlled with input length of base in pixels and both base angles in degrees.
sides = 3;
t = (1/(2*sides):1/(sides):1)*2*pi-pi/3;
x = x_size*sin(t);
y = x_size*cos(t);
this is the code I used.