# Asymptote's dot seems weird in 3D

I have been trying to draw a lattice of a crystal structure with asymptote in 3D environment. I think the vertices should be drawn as a `dot` command. However, with the projection `currentprojection=obliqueX`, the dots are not round.

Does anyone have better solutions?

Minimal Settings

``````settings.render=16;
settings.prc = false;
import three;
size(4cm,0);
currentprojection=obliqueX;
dotfactor=10;
dot(O);
shipout(scale(4.0) *currentpicture.fit());
``````

• A dot is a sphere and then its obliqueX projection is not round ?
– O.G.
Mar 4, 2020 at 7:28
• @O.G. Yes I believe that’s the reason. But what is the right to do? Mar 4, 2020 at 15:04

A sphere x^2+y^2+z^2=1 will not look round in the obliqueX projection, which maps (x,y,z) -> (y-x/2,z-x/2)

To see this, notice that (0,0,0) maps to the (0,0), but (1,0,0) maps to (-1/2,-1/2), (0,1,0) maps to (1,0), which are not equidistant from (0,0).

• Even though I think that you are right, your considerations do not show this IMHO. You have found two points that are equidistant from the origin in 3d, but their projections have different distances from the projection of O. Such points also exist in an orthographic projection. Anyway, +1 because your main statement is correct.
– user194703
Mar 4, 2020 at 7:45
• I have tried orthographic projection but it is not what a usual lattice looks like. I hope to draw round balls in oblique projection lol. Mar 4, 2020 at 15:06

Ok, the normal behavior with obliqueX is not a round dot. If necessary it is possible to have (almost) round dot by scaling with respect to x the sphere. To have a size independent of the size picture I have created a `pic1` which can be scaled and then included at any point of the picture through `add(pic1.fit3(),..)`.

``````    settings.render=16;
settings.prc = false;
import three;
size(4cm,0);
currentprojection=obliqueX;
dotfactor=10;
draw(unitsquare3);
dot(O);
picture pic1;
size(pic1,1cm);
// to avoid shininess nolight
draw(pic1,xscale3(1/10)*scale3(1/4)*unitsphere,nolight);

I added a global `scale3(1/4)` so that the `scale3(10)*pic1.fit3()` gives approximatively a similar size of a dot with 10 as dotfactor.
With `xscale3(1/10)` the result is almost perfect, the surface is a flat sphere. A first attempt was with `xscale3(1/4)` but the result was not perfect. Of course if you have to a more complex picture with multiple colors, the fact that the sphere is flat can produce not realistic picture !