# Droplet in spherical coordinates

I'm working in a droplet combustion problem, and first of all i have to draw spherial coordinates. I've found this

Draw in cylindrical and spherical coordinates

but I want to draw a droplet (grey-black) in the origin of coordinates, as my equations are set outside the droplet. Could somebody help me?

• Do you have equations for the droplet? Or do you want any surface that looks something like a droplet? – Charles Staats Mar 2 '17 at 3:03
• Just a surface. The objective is viewing graphically that the equations will be defined outside the droplet, but the orgin of the coordinates is in the center of the droplet. The reason I'm asking this is that I'm having problems drawing spheres in asymptote, and I think that I've not correclty installed asymptote too. I cannot find a solution and the link I've passed is almost what I want, just like the update#2 image but with a droplet inthe origin of coordinates. – kim_8 Mar 2 '17 at 10:24

Here's a surface that looks like a droplet:

settings.outformat = "png";
settings.render = 4;
import three;

size(10cm);

path half_droplet = (0,1){dir(-90 + 10 /*degrees*/)} .. (0.3,0.5) .. {W}(0,0);

// Subdivide the path to produce a smoother image in the surface of revolution.
half_droplet = subpath(half_droplet, 0, 1) &
subpath(half_droplet, 1, 4/3) &
subpath(half_droplet, 4/3, 5/3) &
subpath(half_droplet, 5/3, 2);

path3 half_droplet_3d = path3(half_droplet, YZplane);
// Create a surface of revolution.
surface droplet = surface(half_droplet_3d, c=O, axis=Z, n=32);
draw(droplet, white);


To put a droplet at the origin in images like those in https://tex.stackexchange.com/a/160528/484 and https://tex.stackexchange.com/a/275592/484, append the following code to either answer:

// draw inner "droplet" sphere

path half_droplet = (0,1){dir(-90 + 10 /*degrees*/)} .. (0.3,0.5) .. {W}(0,0);

// Subdivide the path to produce a smoother image in the surface of revolution.
half_droplet = subpath(half_droplet, 0, 1/2) &
subpath(half_droplet, 1/2, 1) &
subpath(half_droplet, 1, 4/3) &
subpath(half_droplet, 4/3, 5/3) &
subpath(half_droplet, 5/3, 2);

path3 half_droplet_3d = path3(half_droplet, YZplane);
// Create a surface of revolution.
surface droplet = surface(half_droplet_3d, c=O, axis=Z, n=32);
// Shift the droplet to surround at the origin.
droplet = shift(-0.3Z) * droplet;
// Draw the droplet, scaled down.
draw(scale3(0.2r) * droplet, emissive(gray));


Example result:

• Could you please put the image? I'm desesperated with asymptote compilation and i cannot build anything, and i don't mind if it's not the best droplet. I just want this image i.stack.imgur.com/r2Wr0.png with a droplet in the center of coordinates to explain that the equations will be set outside the bubble. Thenk you for helping. – kim_8 Mar 3 '17 at 19:02
• or this one i.stack.imgur.com/ka1kD.png . I don't know which could fit better – kim_8 Mar 3 '17 at 19:09
• I might be able to help with Asymptote issues. What operating system are you using? – Charles Staats Mar 4 '17 at 19:27
• Thank you so much for the image. I am using Windows 10 and I've followed many tutorials, but i get always the same : 'File asymptote.sty' not found'. I'm desesperated with assymptote. – kim_8 Mar 4 '17 at 19:55
• It sounds like the LaTeX package asymptote is missing from your computer. The package allows you to use the Asymptote program from within LaTeX code, but you can install the program without the package (and vice versa). If I'm right, you need to find information on how to install a LaTeX package in Windows, and follow that with the asymptote` package. – Charles Staats Mar 5 '17 at 2:57