FANDOM


Winston
Winston
Description
Type: Computer Science
Details
Introduced in: 2014
Requirement: Ranges from stage
var drawWinston = function(faceX, faceY) {
    fill(255, 255, 0);
    ellipse(faceX, faceY, 190, 190); // face 
    fill(46, 46, 41);
    ellipse(faceX - 30, faceY - 50, 30, 30); // eyes
    ellipse(faceX + 44, faceY - 55, 30, 30);
    fill(252, 65, 65);
    ellipse(faceX + 19, faceY + 32, 82, 81); // mouth
};

Another way to code him

image(getImage("creatures/Winston"), 200, 200, 50,50);

HTML/CSS

<img src="&lt;nowiki&gt;https://www.kasandbox.org/programming-images/creatures/Winston.png&lt;/nowiki&gt;" width=150>

Have Some Fun with Winston

Crazy Winston

var faceX;
var faceY;
var drawWinston = function() {
 fill(255, 255, 0);
 ellipse(faceX, faceY, 300, 300);// face 
 fill(46, 46, 41);
 ellipse(faceX - 45, faceY - 57, 40, 40); // eyes 
 ellipse(faceX + 102, faceY - 66, 40, 40);
 fill(252, 65, 65);
 ellipse(faceX + 55, faceY + 32, 120, 136); // mouth
};
var draw = function() {
 faceX = random(50, 350);
 faceY = random(50, 350);
 drawWinston();
};

See Also