challenge: shining scaling sun
angleMode = "degrees";
var backgroundColor = color(135, 206, 250);
var sunColor = color(255, 255, 0);
var sunStrokeColor = color(200, 200, 0);
var sunDiameter = 100;
var scaleF = 1.5;
var drawCloud = function() {
noStroke();
fill(255, 255, 255);
ellipse(0, 0, 126, 97);
ellipse(60, 0, 70, 60);
ellipse(-60, 0, 70, 60);
};
var drawSunRay = function() {
fill(sunColor);
noStroke();
triangle(0, 90, -40, 0, 40, 0);
};
var drawSun = function() {
//draw sun rays
for ( var i = 0; i < 36; i++) {
pushMatrix();
translate(200,200);
rotate(i*10);
drawSunRay();
popMatrix();
}
//draw center of sun
fill(sunColor);
stroke(sunStrokeColor);
ellipse(width/2, height/2, sunDiameter, sunDiameter);
};
//draw background
background(backgroundColor);
//draw sun
pushMatrix();
translate(scaleF - width/2 * scaleF + width/2, scaleF - height/2*scaleF + height/2);
scale(scaleF);
drawSun();
popMatrix();
//draw clouds
pushMatrix();
translate(300,300);
drawCloud();
popMatrix();
for the last step in this challenge my code is posted above and it works perfectly but the system wont let me move on. i would like to know if there is any other method or the system just isnt working. i have already reported a problem multiple times and i need an answer cause its driving me mad.
Post is afgesloten voor opmerkingen.