2
Copyright 2005 by Mark Weyer
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#declare Dreifachlicht = 1;
20
#declare Hintergrund = 0;
22
#include "cuyopov.inc"
26
#declare Kiefer_Radius = 1/3;
27
#declare Zahnfleisch_Radius = 1/20;
28
#declare Zahn_Duennheit = 8;
30
#declare Zahn_Farbe = <1,1,2/3>;
31
#declare Haut_Farbe = <1,1/2,2/3>;
33
#declare Haut_finish = finish {
39
#macro Zahn_streck(l,w)
58
scale <Zahn_streck(l,w),1/Zahn_Duennheit,1/Zahn_Duennheit>
60
box {<0,-1,-1> <2,1,1>}
61
Textur(pigment {rgb Zahn_Farbe})
68
#declare Rechts_Rampe = function(x) {select(x,exp(-1/(4*x*x)),0)}
70
#declare Doppel_Rampe = function(x1,x2,y1,y2,x)
71
{(y2*Rechts_Rampe((x1-x)/(x2-x1))+y1*Rechts_Rampe((x-x2)/(x2-x1)))
72
/ (Rechts_Rampe((x1-x)/(x2-x1))+Rechts_Rampe((x-x2)/(x2-x1)))}
74
#declare Kiefer_f = function(x,y,z) {
75
Doppel_Rampe (0.5,1.5,-2,0,
77
pow(pow(x/Kiefer_Radius,2)+pow(y/Kiefer_Radius,2),2)+
78
pow(z/(1/Zahn_Duennheit+2*Zahnfleisch_Radius),4),
84
#declare Kreis = function(r,x,y) {
85
sqrt(pow(x/r,2)+pow(y/r,2))
88
#declare Torus = function (r,rr,x,y,z) {
89
Kreis (r,x,sqrt(y*y+z*z)-rr)
92
#declare atanf=function(b,a) // b=sin, a=cos
97
-pi/2-atan2(-(a),-(b))),
104
pi/2+atan2(-(a),(b))),
110
#declare Zahnfleisch_f = function(r,w,x,y,z) {
111
Doppel_Rampe (0.5,1.5,-2,0,
112
Torus (Zahnfleisch_Radius,r,
113
sqrt(x*x+y*y)-Kiefer_Radius,
114
(mod(3.5*pi+atanf(y,x)-w*pi/180,pi)-pi/2)*Kiefer_Radius,
118
#macro Zahnfleisch(l,w)
119
#local rr = sqrt(1-pow(Kiefer_Radius/Zahn_streck(l,w),2))/Zahn_Duennheit
121
+Zahnfleisch_f(rr,w,x,y,z)
126
#macro Gebiss(H,V,D1,D2)
146
-(Kiefer_Radius+2*Zahnfleisch_Radius)
147
(Kiefer_Radius+2*Zahnfleisch_Radius)}}
166
pigment {rgb Haut_Farbe}
167
finish {Haut_finish}})