| 1 |
% fakehole.mp |
| 2 |
% L. Nobre G. |
| 3 |
% IYP (2005) |
| 4 |
|
| 5 |
input featpost3Dplus2D; |
| 6 |
|
| 7 |
Spread := 23; |
| 8 |
f := (13,6,4.5); |
| 9 |
ShadowOn := true; |
| 10 |
LightSource := 10*(4,-1.7,2); |
| 11 |
beginfig(1); |
| 12 |
numeric bigray, smaray, posray, posang, disang, aresiz, dislen; |
| 13 |
numeric numl, numr, holang, i; |
| 14 |
color pos, disaxe, holaxe; |
| 15 |
aresiz := 13; |
| 16 |
bigray := 2; |
| 17 |
smaray := 0.25; |
| 18 |
posray := 4; |
| 19 |
posang := -10; |
| 20 |
disang := 15; |
| 21 |
dislen := 0.4; |
| 22 |
holang := 115; |
| 23 |
numl := 45; |
| 24 |
disaxe := dislen*(cosd(disang),sind(disang),0); |
| 25 |
pos := posray*(cosd(posang),sind(posang),0); |
| 26 |
holaxe := (cosd(disang+90)*cosd(holang), |
| 27 |
sind(disang+90)*cosd(holang), |
| 28 |
sind(holang)); |
| 29 |
HoriZon := -bigray; |
| 30 |
setthestage( 0.5*numl, aresiz ); |
| 31 |
rigorousdisc( smaray, true, pos, bigray, disaxe ); |
| 32 |
numr := floor(bigray/smaray); |
| 33 |
for i=2-numr step 3 until -3: |
| 34 |
fakehole( pos+i*smaray*holaxe, disaxe, smaray ); |
| 35 |
fakehole( pos-i*smaray*holaxe, disaxe, smaray ); |
| 36 |
endfor; |
| 37 |
endfig; |
| 38 |
|
| 39 |
ShadowOn := false; |
| 40 |
Spread := 25; |
| 41 |
ShiftV := 105.00mm*(0.5,1); |
| 42 |
beginfig(2); |
| 43 |
numeric len, ray; |
| 44 |
len = 10; |
| 45 |
ray = 0.9; |
| 46 |
f := (5,2*ray,1+1.5*ray); |
| 47 |
viewcentr := (0,2.5*ray,1+0.5*ray); |
| 48 |
drawoptions( withpen pencircle scaled 2.3pt ); |
| 49 |
kindofcube(false,true,black,0,0,0,1,len*ray,2); |
| 50 |
numeric i; |
| 51 |
for i=2 step 2 until len-1: |
| 52 |
fakehole( (0,i*ray,1), red, ray ); |
| 53 |
endfor; |
| 54 |
endfig; |
| 55 |
|
| 56 |
end. |
| 57 |
|
| 58 |
|
| 59 |
|