Colour Wheel Outline v002
Colour Wheel. Blank Outline
For plotting onto Painting Paper
Log in to post a comment.
// For Oxygen College Cert III in Visual Arts
// API Reference: https://turtletoy.net/syntax
Canvas.setpenopacity(1);
// Adjustable variables
const outerRadius = 100; //min=1 max=100 step=1
const spokeLength = 60; //min=1 max=99 step=1
// Global code will be evaluated once.
const turtle = new Turtle();
turtle.penup();
// -------------------------------------------------
// Outer Circle
// -------------------------------------------------
turtle.goto(0, -outerRadius);
turtle.pendown();
turtle.circle(outerRadius);
// -------------------------------------------------
// Inner Circle
// -------------------------------------------------
const innerRadius = outerRadius - spokeLength;
turtle.penup();
turtle.goto(0, -innerRadius);
turtle.pendown();
turtle.circle(innerRadius);
// -------------------------------------------------
// Spokes
// -------------------------------------------------
for (x = 0; x < 12; x = x + 1) {
turtle.penup();
turtle.goto(0, 0);
turtle.seth(90 + (30 * x) + 15);
turtle.forward(innerRadius);
turtle.pendown();
turtle.forward(spokeLength);
}
// -------------------------------------------------
// Equilateral Triangle
// -------------------------------------------------
// Top point
const topX = 0;
const topY = -innerRadius;
// Bottom-left point
const leftX = innerRadius * Math.sqrt(3) / 2;
const leftY = innerRadius / 2;
// Bottom-right point
const rightX = -innerRadius * Math.sqrt(3) / 2;
const rightY = innerRadius / 2;
// Draw triangle
turtle.penup();
turtle.goto(topX, topY);
turtle.pendown();
turtle.goto(leftX, leftY);
turtle.goto(rightX, rightY);
turtle.goto(topX, topY);
// -------------------------------------------------
// Hexagon
// -------------------------------------------------
// Top point
const hexTopX = 0;
const hexTopY = -innerRadius;
// Upper-right point
const hexUpperRightX = innerRadius * Math.sqrt(3) / 2;
const hexUpperRightY = -innerRadius / 2;
// Lower-right point
const hexLowerRightX = innerRadius * Math.sqrt(3) / 2;
const hexLowerRightY = innerRadius / 2;
// Bottom point
const hexBottomX = 0;
const hexBottomY = innerRadius;
// Lower-left point
const hexLowerLeftX = -innerRadius * Math.sqrt(3) / 2;
const hexLowerLeftY = innerRadius / 2;
// Upper-left point
const hexUpperLeftX = -innerRadius * Math.sqrt(3) / 2;
const hexUpperLeftY = -innerRadius / 2;
// Draw hexagon
turtle.penup();
turtle.goto(hexTopX, hexTopY);
turtle.pendown();
turtle.goto(hexUpperRightX, hexUpperRightY);
turtle.goto(hexLowerRightX, hexLowerRightY);
turtle.goto(hexBottomX, hexBottomY);
turtle.goto(hexLowerLeftX, hexLowerLeftY);
turtle.goto(hexUpperLeftX, hexUpperLeftY);
turtle.goto(hexTopX, hexTopY);
// lower arm of Y
turtle.penup();
turtle.goto(0, 0);
turtle.pendown();
turtle.goto(0, leftY);
// -------------------------------------------------
// Left arm of Y
// Connect centre to midpoint of left side of triangle
// -------------------------------------------------
const leftMidX = (topX + leftX) / 2;
const leftMidY = (topY + leftY) / 2;
turtle.penup();
turtle.goto(0, 0);
turtle.pendown();
turtle.goto(leftMidX, leftMidY);
// -------------------------------------------------
// Right arm of Y
// Connect centre to midpoint of right side of triangle
// -------------------------------------------------
const rightMidX = (topX + rightX) / 2;
const rightMidY = (topY + rightY) / 2;
turtle.penup();
turtle.goto(0, 0);
turtle.pendown();
turtle.goto(rightMidX, rightMidY);