xxxxxxxxxx
65
function setup() {
createCanvas(230 * 4, 70 * 4);
scale(4)
background(0, 0, 0, 0);
stroke(200)
fill(200)
strokeWeight(3)
drawNev(createVector(10, 10), createVector(50, 50), 20)
}
function drawNev(pos, size, space) {
letterN(pos, size, space)
letterE(createVector(pos.x + size.x + space, pos.y), size, space)
letterV(createVector(pos.x + size.x * 2 + space * 2, pos.y), size, space)
}
function letterV(pos, size, space) {
beginShape()
vertex(pos.x, pos.y)
vertex(pos.x + space, pos.y)
vertex(pos.x + size.x / 2 + space, pos.y + size.y)
vertex(pos.x + size.x / 2, pos.y + size.y)
endShape(CLOSE)
line(pos.x + size.x / 2, pos.y + size.y,
pos.x + space + size.x / 2, pos.y)
line(pos.x + space + size.x / 2, pos.y,
pos.x + space * 2 + size.x / 2, pos.y)
line(pos.x + space * 2 + size.x / 2, pos.y,
pos.x + space + size.x / 2, pos.y + size.y)
}
function letterE(pos, size, space) {
line(pos.x, pos.y,
pos.x + size.x, pos.y)
line(pos.x + size.x, pos.y,
pos.x + size.x + space, pos.y + size.y)
line(pos.x + size.x + space, pos.y + size.y,
pos.x + space, pos.y + size.y)
line(pos.x + space, pos.y + size.y,
pos.x, pos.y)
beginShape()
vertex(pos.x + space / 3, pos.y + size.y / 3)
vertex(pos.x + space / 3 + size.x, pos.y + size.y / 3)
vertex(pos.x + space / 3 * 2 + size.x, pos.y + size.y / 3 * 2)
vertex(pos.x + space / 3 * 2, pos.y + size.y / 3 * 2)
endShape(CLOSE)
}
function letterN(pos, size, w) {
line(pos.x, pos.y + size.y,
pos.x + size.x / 2, pos.y)
line(pos.x + w, pos.y + size.y,
pos.x + size.x / 2 + w, pos.y)
line(pos.x + size.x / 2, pos.y,
pos.x + size.x / 2 + w, pos.y)
line(pos.x, pos.y + size.y,
pos.x + w, pos.y + size.y)
beginShape()
vertex(pos.x + w + size.x / 2, pos.y)
vertex(pos.x + w + size.x, pos.y + size.y)
vertex(pos.x + size.x, pos.y + size.y)
vertex(pos.x + size.x / 2, pos.y)
endShape(CLOSE)
}