# asymptote function project cause problem with scaling

When I used asymptote function project I met some strange problem with picture scaling. So, here is an example:

import three;
settings.render = 0;
size(8cm,0);

path3 p1 = unitsquare3;

triple T1 = (0,0,0);
triple T2 = (0.8,0,0);
path3 t = T1 -- T2;

transform3 s1 = shift((0.3,0.2,0)) * rotate(65,(0,0,1));
transform3 s2 = shift((0.1,0.5,0)) * rotate(-20,(0,0,1));

path3 b_1 = s1 * t;
path3 b_2 = s2 * t;

draw(project(p1));
draw(project(b_1));
draw(project(b_2));
label("$\beta$",(0.95,0.95,0),N);


So, we can see such result: Let us change the code above:

draw(p1);
draw(b_1);
draw(b_2);


Let us change again this code:

draw(project(p1));
draw(b_1);
draw(project(b_2));


And we can see now the third picture: Change again:

draw(p1);
draw(b_1);
draw(project(b_2));


In this case we can see the second picture again: How to explain such strange behavior of function project?

• It seems that the objects drawn withproject(path3) do not respect the size constraint. It means that asymptote does not take it into account for the final and automatic size of the picture. project is used in three.asy but through the deferred drawing. At last : why do you use project ?
– O.G.
Jun 15 '17 at 21:23
• Thank you (I've not enough rep to estimate your comment). This is 'stripped' example from experiments with geoespace module. Jun 16 '17 at 4:29

You can prevent the viewpoint from being adjusted by inserting after import three; the line
currentprojection=perspective(1,1,1,autoadjust=false);

• I tried to use currentprojection=perspective(5,4,2,autoadjust=false); and this method doesn't work for me. The types of pictures look like in the pictures of question. Jun 16 '17 at 4:23