Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

110 lines (102 sloc) 3.773 kb
module Models.Reptilian
(reptilian,
reptilian_leg_upper,
reptilian_leg_lower,
reptilian_arm_upper,
reptilian_arm_lower)
where
import RSAGL.Math
import RSAGL.Modeling
import Quality
import Models.Materials
import RSAGL.Color.RSAGLColors
import RSAGL.Math.CurveExtras
import Models.Factions
import Models.FactionData
reptilian :: Faction -> Quality -> Modeling
reptilian f _ = model $
do model $
do tube $ linearInterpolation
[(0 ,Point3D 0 0 (-6)),
(1 ,Point3D 0 5 (-4)),
(1.5 ,Point3D 0 5.5 (-3)),
(2.4 ,Point3D 0 6 (-2)),
(2 ,Point3D 0 7 (-1.5)),
(1.2 ,Point3D 0 8 (-1)),
(0.5 ,Point3D 0 9 (-1.5)),
(1.5 ,Point3D 0 10.5 (-1)),
(1 ,Point3D 0 11 0),
(1 ,Point3D 0 11 1),
(1 ,Point3D 0 11 2),
(0.5 ,Point3D 0 10 2.5),
(0 ,Point3D 0 9 3)]
model $
do triangle (Point3D 0 7 (-2)) (Point3D (-1) 10 (-8)) (Point3D 1 10 (-8))
triangle (Point3D 0 7 (-2)) (Point3D (-0.25) 9 (-9)) (Point3D (-3.5) 9.5 (-8))
triangle (Point3D 0 7 (-2)) (Point3D 0.25 9 (-9)) (Point3D 3.5 9.5 (-8))
triangle (Point3D 0 7 (-2)) (Point3D (-0.5) 8 (-8.5)) (Point3D (-5.5) 9 (-7))
triangle (Point3D 0 7 (-2)) (Point3D 0.5 8 (-8.5)) (Point3D 5.5 9 (-7))
twoSided True
deform $ \(Point3D x y z) -> Point3D x (y+x^2/100) (z+x^2/25+sin (x*10)/4)
material $ skin f reptilian_skin
model $
do sphere (Point3D 0.55 11 2) 0.5
sphere (Point3D (-0.55) 11 2) 0.5
material $ eye f
affine $ scale' (1/20)
reptilian_leg_upper :: Faction -> Quality -> Modeling
reptilian_leg_upper f _ = rotate (Vector3D 1 0 0) (fromDegrees 90) $ model $
do model $ sor $ linearInterpolation $
points2d [(0 ,0),
(1.9,1),
(1.6,5),
(1,7.5),
(0.75,10.6),
(0 ,10.8)]
material $ skin f $
do pigment $ pattern (gradient origin_point_3d (Vector3D 0 10 0)) [(0.0,reptilian_pigment),(1.0,pure dark_pink)]
specular 5.0 $ pattern (gradient origin_point_3d (Vector3D 0 10 0)) [(0.0,reptilian_specular),(1.0,pure red)]
affine $ scale' (1/10)
reptilian_leg_lower :: Faction -> Quality -> Modeling
reptilian_leg_lower f _ = rotate (Vector3D 1 0 0) (fromDegrees 90) $ model $
do sor $ linearInterpolation $
points2d [(0 ,-0.15),
(0.5,-0.1),
(1.0,0.0),
(0.5,9.0),
(0.5,10.0),
(0 ,10.1)]
openCone (Point3D 0 9.5 0,0.5) (Point3D 0 10 7,0.0001)
openCone (Point3D 0 9.5 0,0.5) (Point3D 5 10 5,0.0001)
openCone (Point3D 0 9.5 0,0.5) (Point3D (-5) 10 5,0.0001)
material $ skin f $
do pigment $ pure dark_pink
specular 5.0 $ pure red
affine $ scale' (1/10)
reptilian_arm_upper :: Faction -> Quality -> Modeling
reptilian_arm_upper f _ = rotate (Vector3D 1 0 0) (fromDegrees 90) $ model $
do sor $ linearInterpolation $
points2d [(0 ,0.0),
(1.0,0.1),
(0.5,1.0),
(0.25,5.0),
(0.5,9.0),
(1.0,9.9),
(0 ,0.0)]
material $ skin f $
do pigment $ pure dark_pink
specular 5.0 $ pure red
affine $ scale' (1/10)
reptilian_arm_lower :: Faction -> Quality -> Modeling
reptilian_arm_lower f _ = rotate (Vector3D 1 0 0) (fromDegrees 90) $ model $
do sor $ linearInterpolation $
points2d [(0 ,-1.0),
(1.0,0.0),
(0.25,5.0),
(0.5,9.0),
(0.5,9.9),
(0 ,0.0)]
material $ skin f $
do pigment $ pure dark_pink
specular 5.0 $ pure red
affine $ scale' (1/10)
Jump to Line
Something went wrong with that request. Please try again.