184cc7ba64
Signed-off-by: OOOO <oooooooooooooooo@skiff.com>
134 lines
6.4 KiB
JavaScript
134 lines
6.4 KiB
JavaScript
function _1(md){return(
|
||
md`# #`
|
||
)}
|
||
|
||
function _2(width,DOM,O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O)
|
||
{
|
||
let O_HTDIW_O_WIDTH_O=width;
|
||
let O_THGIEH_O_HEIGHT_O=width/(327/180)+2;
|
||
const dc = DOM.context2d(O_HTDIW_O_WIDTH_O,O_THGIEH_O_HEIGHT_O);
|
||
dc.clearRect(0,0,O_HTDIW_O_WIDTH_O,O_THGIEH_O_HEIGHT_O);
|
||
dc.fillStyle='#F2F2F2';
|
||
var O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O
|
||
=
|
||
O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O;
|
||
|
||
var O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O
|
||
=
|
||
(O_HTDIW_O_WIDTH_O/2/(327/180))
|
||
-
|
||
(
|
||
(O_HTDIW_O_WIDTH_O/2/(327/180))
|
||
*
|
||
(Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O)
|
||
/
|
||
(1+Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O))
|
||
)
|
||
)
|
||
;
|
||
|
||
var O_SUIDAR_ELCRIC_LAMS_O_SMAL_CIRCLE_RADIUS_O
|
||
=
|
||
(
|
||
(O_HTDIW_O_WIDTH_O/2)
|
||
*
|
||
(Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O)
|
||
/
|
||
(1+Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O))
|
||
)
|
||
)
|
||
;
|
||
|
||
var O_X_RETNEC_O_CENTER_X_O=O_HTDIW_O_WIDTH_O/2;
|
||
var O_Y_RETNEC_O_CENTER_Y_O=O_THGIEH_O_HEIGHT_O/2;
|
||
|
||
for (var i = 1; i <= O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O; ++i)
|
||
{
|
||
dc.beginPath();
|
||
var O_ELGNA_O_ANGLE_O = i*2*(4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O;
|
||
var x = O_X_RETNEC_O_CENTER_X_O + Math.cos(O_ELGNA_O_ANGLE_O) * O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O;
|
||
var y = O_Y_RETNEC_O_CENTER_Y_O + Math.sin(O_ELGNA_O_ANGLE_O) * O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O;
|
||
dc.arc(x, y, O_SUIDAR_ELCRIC_LAMS_O_SMAL_CIRCLE_RADIUS_O/(327/180),0,2*(4*Math.atan(1)));
|
||
dc.fill();
|
||
}
|
||
return dc.canvas;
|
||
}
|
||
|
||
|
||
function _3(Inputs,$0){return(
|
||
Inputs.bind(Inputs.range([2, 510], {label: "",width:"100%", step: 1}), $0)
|
||
)}
|
||
|
||
function _O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O(Inputs){return(
|
||
Inputs.range([2, 510], {label: "",width:"100%", step: 1})
|
||
)}
|
||
|
||
function _5(width,DOM,O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O)
|
||
{
|
||
let O_HTDIW_O_WIDTH_O=width;
|
||
let O_THGIEH_O_HEIGHT_O=width/(327/180)+2;
|
||
const dc = DOM.context2d(O_HTDIW_O_WIDTH_O,O_THGIEH_O_HEIGHT_O);
|
||
dc.clearRect(0,0,O_HTDIW_O_WIDTH_O,O_THGIEH_O_HEIGHT_O);
|
||
dc.fillStyle='#F2F2F2';
|
||
var O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O
|
||
=
|
||
O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O;
|
||
|
||
var O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O
|
||
=
|
||
(O_HTDIW_O_WIDTH_O/2/(327/180))
|
||
-
|
||
(
|
||
(O_HTDIW_O_WIDTH_O/2/(327/180))
|
||
*
|
||
(Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O)
|
||
/
|
||
(1+Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O))
|
||
)
|
||
)
|
||
;
|
||
|
||
var O_SUIDAR_ELCRIC_LAMS_O_SMAL_CIRCLE_RADIUS_O
|
||
=
|
||
(
|
||
(O_HTDIW_O_WIDTH_O/2)
|
||
*
|
||
(Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O)
|
||
/
|
||
(1+Math.sin((4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O))
|
||
)
|
||
)
|
||
;
|
||
|
||
var O_X_RETNEC_O_CENTER_X_O=O_HTDIW_O_WIDTH_O/2;
|
||
var O_Y_RETNEC_O_CENTER_Y_O=O_THGIEH_O_HEIGHT_O/2;
|
||
|
||
for (var i = 1; i <= O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O; ++i)
|
||
{
|
||
dc.beginPath();
|
||
var O_ELGNA_O_ANGLE_O = i*2*(4*Math.atan(1))/O_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_O;
|
||
var x = O_X_RETNEC_O_CENTER_X_O + Math.cos(O_ELGNA_O_ANGLE_O) * O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O;
|
||
var y = O_Y_RETNEC_O_CENTER_Y_O + Math.sin(O_ELGNA_O_ANGLE_O) * O_SUIDAR_ELCRIC_EGRAL_O_LARGE_CIRCLE_RADIUS_O;
|
||
dc.arc(x, y, O_SUIDAR_ELCRIC_LAMS_O_SMAL_CIRCLE_RADIUS_O/(327/180),0,2*(4*Math.atan(1)));
|
||
dc.fill();
|
||
}
|
||
return dc.canvas;
|
||
}
|
||
|
||
|
||
function _6(md){return(
|
||
md`# #`
|
||
)}
|
||
|
||
export default function define(runtime, observer) {
|
||
const main = runtime.module();
|
||
main.variable(observer()).define(["md"], _1);
|
||
main.variable(observer()).define(["width","DOM","O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O"], _2);
|
||
main.variable(observer()).define(["Inputs","viewof O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O"], _3);
|
||
main.variable(observer("viewof O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O")).define("viewof O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O", ["Inputs"], _O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O);
|
||
main.variable(observer("O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O")).define("O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O", ["Generators", "viewof O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O"], (G, _) => G.input(_));
|
||
main.variable(observer()).define(["width","DOM","O_EULAW_REDILS_ELCRIC_EGRAL_GNOLA_DEBIRCSNI_SELCRIC_LAMS_FO_REBMUN_O_NUMBER_OF_SMAL_CIRCLES_INSCRIBED_ALONG_LARGE_CIRCLE_SLIDER_WALUE_O"], _5);
|
||
main.variable(observer()).define(["md"], _6);
|
||
return main;
|
||
}
|