Inheritance: PovObj
Ejemplo n.º 1
0
 public JuliaFractal(String algebra, String function, int precision, int iterations,
     Point3 location = null, float x = -0.162f, float y = 0.163f, float z = 0.560f, float k = -0.599f,
     Signal<float> rx = null, Signal<float> ry = null, Signal<float> rz = null, Signal<float> rk = null,
     Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive = reactive;
     this.loc = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.rot = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.tex = texture ?? new POVColor("Red");
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.x = rx ?? new Lift0f(x);
     this.y = ry ?? new Lift0f(y);
     this.z = rz ?? new Lift0f(z);
     this.k = rk ?? new Lift0f(k);
     if (algebra.Equals("quaternion"))
     {
         this.algebra = algebra;
     }
     else if (algebra.Equals(" hypercomplex"))
     {
         this.algebra = algebra;
     }
     else this.algebra = "quaternion";
     this.precision = precision;
     this.iterations = iterations;
     this.function = function;
 }
Ejemplo n.º 2
0
 public Blob(float threshold = .06f, Point3 rotate = null, Point3 translate = null, List<PovObj> blob = null, bool reactive = false, Signal<float> rthresh = null)
 {
     this.reactive = reactive;
     this.threshold = rthresh ?? new Lift0f(threshold);
     this.rot = rotate ?? new Point3(0,0,0, reactive: reactive);
     this.trans = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.blob = blob ?? new List<PovObj>();
 }
Ejemplo n.º 3
0
 private Light(Point3 loc, Point3 color, float fadeDist, float fadePower, Boolean shadows, Boolean interaction, Boolean atmosphere, String type = " ")
 {
     this.loc = loc;
     this.color = color ?? new Point3(1,1,1);
     this.type = type;
     this.fadeDist = fadeDist;
     this.fadePower = fadePower;
 }
Ejemplo n.º 4
0
 public Sphere(Point3 location = null, float radius = 1.0f, Signal<float> rrad = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive = reactive;
     this.location = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture = texture ?? new POVColor("Red");
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.radius = rrad ?? new Lift0f(radius);
 }
Ejemplo n.º 5
0
 public Torus(float outerrad = 1.0f, Signal<float> outerradr = null, float innerrad = 1.0f, Signal<float> innerradr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.outerrad = outerradr ?? new Lift0f(outerrad);
     this.innerrad = innerradr ?? new Lift0f(innerrad);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture = texture ?? new POVColor("Red");
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.reactive = reactive;
 }
Ejemplo n.º 6
0
 public Box(Point3 lowerleftcorner = null, Point3 upperrightcorner = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive = reactive;
     this.lowerleftcorner = lowerleftcorner ?? new Point3(0, 0, 0, reactive: reactive);
     this.upperrightcorner = upperrightcorner ?? new Point3(0, 0, 0, reactive: reactive);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.texture = texture ?? new POVColor("Red");
 }
Ejemplo n.º 7
0
 public Plane(Point3 normal = null, float disp = -1.0f, Signal<float> dispr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.normal = normal ?? new Point3(0, 1, 0, reactive: reactive);
     this.disp = dispr ?? new Lift0f(disp);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture = texture ?? new POVColor("Red");
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.reactive = reactive;
 }
Ejemplo n.º 8
0
 public Camera(Point3 location = null, Point3 look_at = null, float bumps = 0.0f, Signal<float> bumpsr = null, String mesh = null, Signal<String> meshr = null, bool reactive = false)
 {
     //to add a mesh to the camera use the mesh identifier in the constructor
     //to make the image appear as if through curved glass increase the number of bumps
     this.location = location ?? new Point3(0, 2, -3, reactive: reactive);
     this.look_at = look_at ?? new Point3(0, 1, 2, reactive: reactive);
     _bumps = bumpsr ?? new Lift0f(bumps);
     _mesh = meshr ?? new Lift0s(mesh);
     this.reactive = reactive;
 }
Ejemplo n.º 9
0
 public Plane(Point3 vectorx = null, Point3 vectory = null, float disp = -1.0f, Signal<float> dispr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, bool reactive = false)
 {
     Point3 n = vectorx.crossproduct(vectory);
     this.normal = n ?? new Point3(0, 1, 0, reactive: reactive);
     this.normal.reactive = reactive;
     this.disp = dispr ?? new Lift0f(disp);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture = texture ?? new POVColor("Red");
     this.reactive = reactive;
 }
Ejemplo n.º 10
0
 public Cylinder(Point3 basepoint = null, Point3 toppoint = null, float radius = 1.0f, Signal<float> radiusr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.basepoint = basepoint ?? new Point3(0, 0, 0, reactive: reactive);
     this.toppoint = toppoint ?? new Point3(0, 0, 0, reactive: reactive);
     this.radius = radiusr ?? new Lift0f(radius);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.texture = texture ?? new POVColor("Red");
     this.reactive = reactive;
 }
Ejemplo n.º 11
0
 public SuperEllipsoid(Point3 location = null,float e =3f, float n = 2f, Signal<float> re = null,Signal<float> rn = null,
     Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive = reactive;
     this.loc = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.trans = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rot = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.e = re ?? new Lift0f(e);
     this.n = rn ?? new Lift0f(n);
     this.tex = texture ?? new POVColor("Red");
 }
Ejemplo n.º 12
0
 public Cone(Point3 bottompoint = null, float bottomradius = 1.0f, Signal<float> bottomradiusr = null, Point3 toppoint = null, float topradius = 0.0f, Signal<float> topradiusr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null ,String finish = null, bool reactive = false)
 {
     this.bottompoint = bottompoint ?? new Point3(0, 0, 0);
     this.bottomradius = bottomradiusr ?? new Lift0f(bottomradius);
     this.toppoint = toppoint ?? new Point3(0, 0, 0);
     this.topradius = topradiusr ?? new Lift0f(topradius);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.texture = texture ?? new POVColor("Red");
     this.reactive = reactive;
 }
Ejemplo n.º 13
0
 public Ovus(Point3 location = null, float topRadius = 1.0f, float bottomRadius = 2f, Signal<float> rt = null,
     Signal<float> rb = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null,
     bool reactive = false)
 {
     this.reactive = reactive;
     this.loc = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.trans = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rot = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.tex = texture ?? new POVColor("Red");
     this.topRadius = rt ?? new Lift0f(topRadius);
     this.bottomRadius = rb ?? new Lift0f(bottomRadius);
 }
Ejemplo n.º 14
0
 //vector perpendicular to given vectors
 public Point3 crossproduct(Point3 vec)
 {
     if (this != null && vec != null)
     {
         Point3 results = new Point3(0, 0, 0);
         results.x = this.y * vec.z - this.z * vec.y;
         results.y = this.z * vec.x - this.x * vec.z;
         results.z = this.x * vec.y - this.y * vec.x;
         return results;
     }
     else
     {
         return null;
     }
 }
Ejemplo n.º 15
0
        public Sor(int numPoints, PointF[] p,
            Point3 location = null, float radius = 1.0f, Signal<float> rrad = null,
            Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
        {
            this.numPoints = numPoints;
            this.loc = location ?? new Point3(0, 0, 0, reactive: reactive);
            this.rot = rotation ?? new Point3(0, 0, 0, reactive: reactive);
            this.tex = texture ?? new POVColor("Green");
            this.p = p;
            this.finish = finish ?? "finish {phong .9 reflection .5}";

            for (int i = 0; i < p.Length - 1; i++)
            {
                points += "< " + p[i].X + ", " + p[i].Y + "> , ";
            }
            points += "< " + p[p.Length - 1].X + ", " + p[p.Length - 1].Y + ">";
        }
Ejemplo n.º 16
0
 public Prism(String spline_type, float height1, float height2, int numPoints, Point2[] p, Point3 loc = null,
     bool reactive = false, Signal<float> rh1 = null, Signal<float> rh2 = null, Signal<float> nps = null)
 {
     this.reactive = reactive;
     this.spline_type = spline_type;
     this.numPoints = nps ?? new Lift0f(numPoints);
     this.loc = loc ?? new Point3(0, 0, 0, reactive: reactive);
     this.p = p;
     this.height1 = rh1 ?? new Lift0f(height1);
     this.height2 = rh2 ?? new Lift0f(height2);
     this.texture = new POVColor("Green");
     //ints = this.height1+", "+this.height2+", " + this.numPoints;
     for (int i = 0; i < p.Length - 1; i++)
     {
         points += "< " + p[i].x + ", " + p[i].y + "> , ";
     }
     points += "< " + p[p.Length - 1].x + ", " + p[p.Length - 1].y + ">";
 }
Ejemplo n.º 17
0
 public Parametric(String xFunc, String yFunc, String zFunc,
     Point3 location = null, float u1 = 0f, float u2 = 7f, float v1 = 0f, float v2 = 7f, Signal<float> ru1 = null,
     Signal<float> ru2 = null, Signal<float> rv1 = null, Signal<float> rv2 = null,String bounds = "{box {<-1,-1,-1>*2*pi,<1,8/3,1>*2*pi}}",
     Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive = reactive;
     this.xFunc = xFunc;
     this.yFunc = yFunc;
     this.zFunc = zFunc;
     this.bounds = bounds;
     this.u1 = ru1 ?? new Lift0f(u1);
     this.u2 = ru2 ?? new Lift0f(u2);
     this.v1 = rv1 ?? new Lift0f(v1);
     this.v2 = rv2 ?? new Lift0f(v2);
     this.finish = finish ?? "finish {phong .9 reflection .5}";
     this.loc = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.trans = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rot = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.tex = texture ?? new POVColor("Red");
 }
Ejemplo n.º 18
0
 public SpotLight(Point3 loc, Point3 color, float radius, float falloff, float tightness, Point3 pointAt, float fadeDist, float fadePower, Boolean shadows, Boolean interaction, Boolean atmosphere)
     : base(loc, color, fadeDist, fadePower, shadows, interaction, atmosphere, type: "spotlight")
 {
     this.radius = radius;
     this.falloff = falloff;
     this.tightness = tightness;
     this.pointAt = pointAt;
 }
Ejemplo n.º 19
0
 public void move(Point3 transform)
 {
     this.translate = transform;
 }
Ejemplo n.º 20
0
 private void renderButt_Click(object sender, EventArgs e)
 {
     writer1.Add("width=" + imageWidthTB.Text);
     writer1.Add(Environment.NewLine);
     writer1.Add("height=" + imageHeightTB.Text);
     writer1.Add(Environment.NewLine);
     writer1.Add("Display_Gamma=" + imageGammaBar.Value / 100.0);
     writer1.Add(Environment.NewLine);
     writer1.Add("+Q" + quality);
     writer1.Add(Environment.NewLine);
     writer1.Add("Antialias=On");
     writer1.Add(Environment.NewLine);
     writer1.Add("Antialias_Threshold=" + alias);
     Point3 camLoc = new Point3((Convert.ToInt32(xPosTB.Text)), (Convert.ToInt32(yPosTB.Text)), (Convert.ToInt32(zPosTB.Text)));
     Point3 camLook = new Point3((Convert.ToInt32(xDirTB.Text)), (Convert.ToInt32(yDirTB.Text)), (Convert.ToInt32(zDirTB.Text)));
     camXPosLab.Text = " " + camLoc.x;
     camYPosLab.Text = " " + camLoc.y;
     camZPosLab.Text = " " + camLoc.z;
     camXDirLab.Text = " " + camLook.x;
     camXDirLab.Text = " " + camLook.y;
     camXDirLab.Text = " " + camLook.z;
     frame.remove(cam);
     cam = new Camera(location: camLoc, look_at: camLook);
     frame.add(cam);
     frame.render();
 }
Ejemplo n.º 21
0
 public AreaLight(Point3 loc, Point3 color, Point3 vector1, Point3 vector2, int widthLight, int heightLight, float fadeDist, float fadePower, Boolean shadows, Boolean interaction, Boolean atmosphere)
     : base(loc, color, fadeDist, fadePower, shadows, interaction, atmosphere, type: "area_light")
 {
     this.vector1 = vector1;
     this.vector2 = vector2;
     this.widthLight = widthLight;
     this.heightLight = heightLight;
 }
Ejemplo n.º 22
0
 public void move(Point3 loc)
 {
     this.loc = loc;
 }
Ejemplo n.º 23
0
 public static Light cylindricalLight(Point3 loc, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return(new Light(loc, color, fadeDist, fadePower, shadows, interaction, atmosphere, "cylinder"));
 }
Ejemplo n.º 24
0
 public JuliaFractal(float x, float y, float z, float k, String algebra, String function, int precision, int iterations, Point3 loc)
 {
     this.loc = loc;
     this.x   = x;
     this.y   = y;
     this.z   = z;
     this.k   = k;
     if (algebra.Equals("quaternion"))
     {
         this.algebra = algebra;
     }
     else if (algebra.Equals(" hypercomplex"))
     {
         this.algebra = algebra;
     }
     else
     {
         this.algebra = "quaternion";
     }
     this.precision  = precision;
     this.iterations = iterations;
     this.function   = function;
     this.texture    = new POVColor("Red");
 }
Ejemplo n.º 25
0
 public static Light spotLight(Point3 loc, float radius = 0f, float falloff = 0f, float tightness = 0f, Point3 pointAt = null, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return new SpotLight(loc, color, radius, falloff, tightness, pointAt, fadeDist, fadePower, shadows, interaction, atmosphere);
 }
Ejemplo n.º 26
0
 public void move(Point3 loc)
 {
     this.location = loc;
 }
Ejemplo n.º 27
0
 public SpotLight(Point3 loc, Point3 color, float radius, float falloff, float tightness, Point3 pointAt, float fadeDist, float fadePower, Boolean shadows, Boolean interaction, Boolean atmosphere)
     : base(loc, color, fadeDist, fadePower, shadows, interaction, atmosphere, type: "spotlight")
 {
     this.radius    = radius;
     this.falloff   = falloff;
     this.tightness = tightness;
     this.pointAt   = pointAt;
 }
Ejemplo n.º 28
0
 public void changeView(Point3 look_at)
 {
     this.look_at = look_at;
 }
Ejemplo n.º 29
0
 public Sphere(Point3 location = null, float radius = 1.0f, Signal <float> rrad = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive  = reactive;
     this.location  = location ?? new Point3(0, 0, 0, reactive: reactive);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation  = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture   = texture ?? new POVColor("Red");
     this.finish    = finish ?? "finish {phong .9 reflection .5}";
     this.radius    = rrad ?? new Lift0f(radius);
 }
Ejemplo n.º 30
0
 public static Light spotLight(Point3 loc, float radius = 0f, float falloff = 0f, float tightness = 0f, Point3 pointAt = null, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return(new SpotLight(loc, color, radius, falloff, tightness, pointAt, fadeDist, fadePower, shadows, interaction, atmosphere));
 }
Ejemplo n.º 31
0
 public static Light areaLight(Point3 loc, Point3 vector1, Point3 vector2, int widthLight, int heightLight, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return new AreaLight(loc, color, vector1, vector2, widthLight, heightLight, fadeDist, fadePower, shadows, interaction, atmosphere);
 }
Ejemplo n.º 32
0
 public void move(Point3 loc)
 {
     this.loc = loc;
 }
Ejemplo n.º 33
0
 public static Light pointLight(Point3 loc, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return new Light(loc, color, fadeDist, fadePower, shadows, interaction, atmosphere, "");
 }
Ejemplo n.º 34
0
 public void move(Point3 transform)
 {
     this.translate = transform;
 }
Ejemplo n.º 35
0
 public Light(Point3 loc)
 {
     this.loc = loc;
     this.color = "White";
 }
Ejemplo n.º 36
0
 public Prism(String spline_type, float height1, float height2, int numPoints, Point2[] p, Point3 loc = null,
              bool reactive = false, Signal <float> rh1 = null, Signal <float> rh2 = null, Signal <float> nps = null)
 {
     this.reactive    = reactive;
     this.spline_type = spline_type;
     this.numPoints   = nps ?? new Lift0f(numPoints);
     this.loc         = loc ?? new Point3(0, 0, 0, reactive: reactive);
     this.p           = p;
     this.height1     = rh1 ?? new Lift0f(height1);
     this.height2     = rh2 ?? new Lift0f(height2);
     this.texture     = new POVColor("Green");
     //ints = this.height1+", "+this.height2+", " + this.numPoints;
     for (int i = 0; i < p.Length - 1; i++)
     {
         points += "< " + p[i].x + ", " + p[i].y + "> , ";
     }
     points += "< " + p[p.Length - 1].x + ", " + p[p.Length - 1].y + ">";
 }
Ejemplo n.º 37
0
 public Box(Point3 lowerleftcorner = null, Point3 upperrightcorner = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, String finish = null, bool reactive = false)
 {
     this.reactive         = reactive;
     this.lowerleftcorner  = lowerleftcorner ?? new Point3(0, 0, 0, reactive: reactive);
     this.upperrightcorner = upperrightcorner ?? new Point3(0, 0, 0, reactive: reactive);
     this.translate        = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation         = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.finish           = finish ?? "finish {phong .9 reflection .5}";
     this.texture          = texture ?? new POVColor("Red");
 }
Ejemplo n.º 38
0
 public Light(Point3 loc, string color)
 {
     this.loc = loc;
     this.color = color;
 }
Ejemplo n.º 39
0
 public void move(Point3 loc)
 {
     this.x = loc.x;
     this.y = loc.y;
     this.z = loc.z;
 }
Ejemplo n.º 40
0
 public static Light areaLight(Point3 loc, Point3 vector1, Point3 vector2, int widthLight, int heightLight, Point3 color = null, float fadeDist = 0.0f, float fadePower = 0.0f, Boolean shadows = true, Boolean interaction = true, Boolean atmosphere = false)
 {
     return(new AreaLight(loc, color, vector1, vector2, widthLight, heightLight, fadeDist, fadePower, shadows, interaction, atmosphere));
 }