Next2Dで始めるゲーム開発 - Game Development Starting with Next2DToshiyuki Ienaga
?
CEDEC2022に応募したのですが、見事に落選しました。
が、折角作った資料なので公開します。
I applied for CEDEC2022, but was not selected.
However, I am publishing this document because I made it at an opportunity.
Next2Dで始めるゲーム開発 - Game Development Starting with Next2DToshiyuki Ienaga
?
CEDEC2022に応募したのですが、見事に落選しました。
が、折角作った資料なので公開します。
I applied for CEDEC2022, but was not selected.
However, I am publishing this document because I made it at an opportunity.
The document describes code for displaying and formatting text in Processing. It includes code to set up a sketch, draw text centered horizontally and vertically on a white background, draw lines to intersect at the center, and draw the same text aligned to the right, center, and with different textAlign settings.
The document discusses sinusoidal waves and polar coordinates. It contains code examples that generate sinusoidal waves by plotting ellipses along the y-axis using sinusoidal functions of the theta variable. The theta variable is incremented each frame to animate the waves. It also contains an explanation of polar coordinates using the notation (r*cos(θ),r*sin(θ)) to represent a point in polar space. Finally, it shows code for circular motion by calculating x and y coordinates based on polar coordinates and animating theta to rotate around a circle.
10. for
function setup() {
createCanvas(400, 400);
}
function draw() {
background("#ccc");
// 9個の円を並べる
for (let i = 0; i < 9; i++) {
circle(i * 40 + 40, 200, 40);
}
}
11. if
function setup() {
createCanvas(400, 400);
}
function draw() {
background("#ccc");
// 9個の円を並べ偶数奇数で?を変える
for (let i = 0; i < 9; i++) {
if(i % 2 == 0) {
fill("#AB39F5");
}
else {
fill("#F1CC4D");
}
circle(i * 40 + 40, 200, 40);
}
}
12. function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
noStroke();
}
function draw() {
background("#000");
// 360個の?さな円を
// サインとコサインを使って花の形に配置
for (let i = 0; i < 360; i++) {
if (i % 2 == 0) {
fill("#AB39F5");
}
else {
fill("#F1CC4D");
}
let r = 180 * sin(i * 4);
let x = r * cos(i) + 200;
let y = r * sin(i) + 200;
circle(x, y, 10);
}
}