three.js create square with ellipse cut out from opposing corners - graphics

I want to create a path that I can extrude that would be the equivalent of the difference of a square and a circle with radius equal to the side of the square with its center at the upper right corner of the square.

Related

How do I draw the bounding rectangle of a Picture in gloss?

Is there a function in gloss that, given a Picture returns the width, height and coordinates of the smallest rectangle that encloses the Picture? If not, is it possible to write one?

Midpoint Ellipse Algorithm vs Midpoint Circle Algorithm

I have the Midpoint Ellipse drawing Algorithm and I have the Midpoint Circle drawing Algorithm.
Why do I need a separate algorithm for drawing circles, when I can just use the Ellipse midpoint algorithm for drawing a circle simply by specifying the radii along both axes to be of equal length?

Draw arc by angle in SVG

When I want to draw a pie chart in SVG, all tutorials say that you need to calculate the end point of the arc element. Unless you want an exact 90° angle, that calculated point must unvariably fall beside the circumference line of the underlying circle because of rounding, if you scale up the scalable (!) graphic.
I cannot believe there is no way to draw a circle segment by giving a center, a radius and an angle.
Or is there?

Centroid for a rectangular section inclined at an angle theta

How to find Centroid for a rectangular section inclined at an angle theta? Is there any general formula available?
Centroid of a rectangle is situated at intersection of it's diagonals (or arithmetic mean of all vertices). So it is enough to find vertice coordinates after inclination
Centroid of a rectangle does not changes, after inclination.
Only the co-ordinates of a Rectangle changes with the following equation.
x′=xcosθ − ysinθ
y′=xsinθ + ycosθ
where,
(x,y)-initial co-ordinates of rectangle.
(x',y')-final co-ordinates of rectangle.
θ-angle of inclination.
Refer link for detail.

Direction of a Triangle (Where is the triangle pointing)

Given 3 2d points that form a triangle, is there a property of a triangle which does not change after any sort of rotation which would help in giving me the direction vector for that triangle. For eg if a triangle is isosceles i can get the direction vector by joining the midpoint of the base to the opposite vertex and I know which 2 points make the base by looking at the distances. Similar thing can be done for right angle triangles.
Can this be generalized to all triangles?
It seems that only an isosceles (or near-isosceles) triangle can be pointing in a certain direction.
Calculate the 3 angles of the triangle, the side surrounded by the two identical (or perhapse similar) angles is your base. Then go from there.

Resources