put an asymmetrical object in blades to make sure rotation is good
This commit is contained in:
parent
974bb1e4cc
commit
342c9a146e
27
blades.asy
27
blades.asy
|
@ -1,28 +1,3 @@
|
|||
import "scaling.asy" as scaling;
|
||||
|
||||
//real x = width/3;
|
||||
//real y = 2*height/6;
|
||||
|
||||
//path bread = (x,0){right}..{up}(width, height-y){up}..{left}(width-x, height){left}..{down}(0,y){down}..{right}cycle;
|
||||
|
||||
real outer_radius = height/2;
|
||||
real inner_radius = outer_radius*4/5;
|
||||
real center_radius = outer_radius/5;
|
||||
real axle_radius = center_radius/2;
|
||||
|
||||
int gaps = 6;
|
||||
real spoke_width = center_radius*0.7;
|
||||
|
||||
path spoke_part = (spoke_width/2, 0)--(spoke_width/2, outer_radius);
|
||||
|
||||
path gap = buildcycle(circle((0,0), center_radius), spoke_part, reverse(circle((0,0), inner_radius)), reflect((0,0), dir(90-180/gaps))*spoke_part);
|
||||
|
||||
//draw((-width/2,-height/2)--(width/2,-height/2)--(width/2,height/2)--(-width/2,height/2)--cycle);
|
||||
|
||||
path wheel[] = { circle((0,0), outer_radius), circle((0,0), axle_radius) };
|
||||
|
||||
for (int i = 0; i < gaps; ++i) {
|
||||
wheel = wheel^^(rotate(360*i/gaps)*gap);
|
||||
}
|
||||
|
||||
//fill(wheel, evenodd+red);
|
||||
path blade[] = { scale(width)*(dir(-30)--dir(90)--dir(210)--cycle) };
|
||||
|
|
Loading…
Reference in a new issue