Skip to content

Commit

Permalink
added "circle_polar"
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-reznik committed Aug 6, 2024
1 parent 266efcf commit cb8a3ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions circles.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,15 @@ function circle_bevan(tri,sides) {
return { ctr:x40, R:R, n:40 };
}

// 8/6/2024: https://mathworld.wolfram.com/PolarCircle.html
function circle_polar(tri,sides) {
const x4 = get_Xn_cartesians(4,tri,sides);
const R = get_circumradius(sides);
const l2 = sum(sides.map(s => s * s));
const rpol2 = 4*R*R - l2/2;
return { ctr:x4, R:sqrt(Math.abs(rpol2)), n:4 };
}

function circle_mandart(tri,sides) {
const ext_ts = extouch_triangle(sides);
const ext = generic_triangle(tri,sides,ext_ts);
Expand Down
1 change: 1 addition & 0 deletions components.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ var html = function(xn_number, trilins_selected, tri_selected, rgb_color, hex_co
`<option value="neuberg_refls">neubs.123r</option>
<option value="parry">parry</option>
<option value="poincs">poincs123</option>
<option value="polar">polar</option>
<option value="power1">power1</option>
<option value="powers">powers123</option>
<option value="reflection">reflection</option>
Expand Down
1 change: 1 addition & 0 deletions locus.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const dict_circles = {
moses_radical: circle_moses_radical,
spieker: circle_spieker,
parry: circle_parry,
polar: circle_polar,
power1: circle_power_1,
reflection: circle_reflection,
schoutte: circle_schoutte,
Expand Down

0 comments on commit cb8a3ce

Please sign in to comment.