GMU:Wild Type/Benjamin Voßler: Difference between revisions

From Medien Wiki
Line 241: Line 241:




==3D==
== 3D ==
 
= Object: =
https://www.dropbox.com/sh/qk613aj9p8buo0n/AABj9bmtXLfS2rH2kQQlIRSVa?dl=0
 
= Code: =
 
import peasy.*;
 
PShape H;
 
PeasyCam cam;
 
void setup() {
  size(1920, 800, P3D);
  cam = new PeasyCam(this, 100);
  cam.setMinimumDistance(50);
  cam.setMaximumDistance(500);
 
  H = loadShape("H.obj");
  H.scale(50);
}
void draw() {
  H.rotateX(-.005);
  H.rotateY(-.002);
 
  float fov = PI/3;
  float cameraZ = (height/2.0) / tan(fov/2.0);
  perspective(fov, float(width)/float(height), cameraZ/200.0, cameraZ*200.0);
 
  background(0);
  lights();
 
  pushMatrix();
  //translate(1500, -400, 0);
  H.setFill(color(200, 50, 70));
  shape(H);
  popMatrix();
}


=Object:=
=Object:=