How to do an Asymptote smiley

Revision as of 18:09, 4 July 2016 by Peacelove (talk | contribs) (Created page with " To make a smiley using Asymptote, use the following: [asy] size(80); dot((-1,1)); //left eye dot((1,1)); //right eye draw(Arc((0,0),1.3,-150,-30)); //mouth draw(Circle((0,0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
To make a smiley using Asymptote, use the following:


[asy] size(80); dot((-1,1)); //left eye dot((1,1)); //right eye draw(Arc((0,0),1.3,-150,-30)); //mouth draw(Circle((0,0),3)); //circular face [/asy]


To make a yellow smiley( you can change the color), use this:

[asy] size(225); filldraw(Circle((-15,0), 4),yellow); draw(Arc((-15,0), 2.5, 205, 335)); dot((-1.5-15, 2)); dot((1.5-15,2)); draw(Circle((0,0), 4)); fill((Circle((0,0), 4)),yellow); fill((Circle((4.3,-2.2), .7)),yellow); draw(Circle((4.3,-2.2), .7)); draw(Arc((3.5,0), 2.5, 225, 260)); draw(Circle((7,-3), 1)); fill((Circle((7,-3), 1)),red); draw((8.3, -2.5)--(12, -1)); draw((11, -0.8)--(12,-1)--(11.8,-1.7)); draw((13,-4)--(15,-4)--(15,6)--(13,6)--cycle); filldraw(((13,-4)--(15,-4)--(15,6)--(13,6)--cycle),red); draw((1.8,1.7)--(1.8,1.2), linewidth(1));[/asy]