バレンタインデー記念 Celebrate St. Valentine's Day
| makeresults count=2
| streamstats count as x
| eval x=if(x=1,0.00000,1.80000)
| makecontinuous x span=0.01
| eval z=split("A#B#C#D","#")
| stats values(x) as x by z
| stats count by x z
| eval y = case(x < 1 AND (z="A" OR z="C"),exact(pow(x,(2/3))) + exact(sqrt(1 - pow(x,2)))
,x < 1 AND (z="B" OR z="D"),exact(pow(x,(2/3))) - exact(sqrt(1 - pow(x,2))))
| eval x = if(z="C" OR z="D",x * -1, x)
| table x , y
| sort 0 x
| rename y as LOVE
#まとめ Conclusion
チョコ食べたい。 I want to eat chocolate.
#蛇足的ななにか Superfluity
cf. ハートの方程式 TheFormulaOfHeart
この図は一つのXの点に対して二つのYの点を描画することになります。
それもあり、四象限用の数列を作成するため
makecontinuous
で一つの象限の数列を(0〜1)作成し、それをstats
とmvexpand
で4つに増やしています。
- | + | |
---|---|---|
+ | C | A |
- | D | B |
方程式のプラスマイナスは象限により変わりますので、それをeval if()
で制御しつつ、Y軸で対象の図形であるため、_-1_をかけて変換しています。
This figure will draw two Y points for one X point.
Also, to create a sequence for four quadrants
makecontinuous
creates a sequence of quadrants (0-1) and increases it to four with stats
and mvexpand
.
Since the plus and minus of the equation varies depending on the quadrant,
while controlling it with eval if()
, since it is the target figure on the Y axis, -1 is multiplied and converted.