27-01-2021

https://editor.p5js.org/Rayll/present/b1SKaik3z

function setup() {
  createCanvas(400, 400);
  background(0);
}

function draw() {
  
  
  fill(mouseX,mouseY,0)
  noStroke();
  circle(mouseX,mouseY,30);
  
  /*fill(0,54,98);
  circle(250,100,40);
  
  fill(34,139,34)
  circle(50,200,10);
  
  fill(34,0,34)
  circle(50,20,10);*/
}


function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  
  fill(255,0,0)
  circle(50,100,30);
  
  fill(0,54,98);
  circle(250,100,40);
  
  fill(34,139,34)
  circle(50,200,10);
  
  fill(34,0,34)
  circle(50,20,10);
}

wed 17 march 2021

3D WEBGL

https://editor.p5js.org/Rayll/full/fJzuVrSpg

let head;
function preload()
{
  head = loadModel("male_head.obj")
}
function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background(220);
  //orbitControl();
  scale(2)
  rotateX(frameCount/100)
  rotateY(frameCount/100)
  normalMaterial()
  
      translate(40, 40, 0);
      
      model(head)
    
}