This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.
It is recommended to name the SVG file “Circle2heart.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.
Long description
"It's not complex-analytic, but
makes nice-looking heart shapes out of circles centered on the origin (different for different radii)" [1]
/*
batch file for maxima
mapping from :
the circle with center=0 and radius=r
given by equation : abs(2*z)=1
where : z:x+y*%i=r*cos(t)+%i*r*sin(t) =
onto
non-cardioid heart curve
is given by equation:
c:x+(sqrt(abs(x))- y)*%i;
*/
/* */
f(w):=sqrt(abs(realpart(w)))-imagpart(w);
iMax:1000; /* number of points to draw */
dt:1/iMax;
r:4; /* radius of circle */
/*
circle D={w:abs(2w)=1 } where w=l(t)
t is angle in turns ; 1 turn = 360 degree = 2*Pi radians
*/
l(t):=r*%e^(%i*t*2*%pi)/2;
/* point to point method of drawing */
t:0; /* angle in turns */
/* compute first point of curve, create list and save point to this list */
/* point of unit circle w:l(t); */
w:rectform(ev(l(t), numer)); /* "exponential form prevents allroots from working", code by Robert P. Munafo */
circleList:makelist (w, j, 1, 1);
for i:1 thru iMax step 1 do
block
(t:t+dt,
w:rectform(ev(l(t), numer)), /* "exponential form prevents allroots from working", code by Robert P. Munafo */
circleList:cons(w,circleList)
);
/* convert one list into 2 lists */
xxCircle:map(realpart, circleList);
yyCircle:map(imagpart, circleList);
/* convert one list into 2 lists and maps */
xxHeart:map(realpart, circleList);
yyHeart:map(f, circleList);
load(draw); /* Mario Rodríguez Riotorto http://www.telefonica.net/web2/biomates/maxima/gpdraw/index.htmlarchive copy at the Wayback Machine */
draw(file_name = "a",
terminal = 'png, pic_width = 1000,
pic_height = 500,
columns = 2,
gr2d(title = " circle D={w:abs(2*w)=4 } ",
points_joined =true,
color = red,
point_type = 0,
points(xxCircle,yyCircle)),
gr2d(title = "non-cardioid heart shape curve ",
points_joined =true,
color = blue,
point_type = 0,
points(xxHeart,yyHeart))
);
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents