Herunterladen Inhalt Inhalt Diese Seite drucken

SunFounder Da Vinci Kit Bedienungsanleitung Seite 437

Für den raspberry pi 4 modell b, 3 modell a +, 3 modell b +, 3 modell b, 2 modell b, 1 modell b +, 1 modell a +, zero w and zero
Inhaltsverzeichnis

Werbung

}
class
Dot
{
float
initX;
float
initY;
currentX;
float
float
currentY;
int
positionRange
float
initSize;
float
currentSize;
int
sizeRange
=
int
initColor;
int
currentColor;
int
ColorRange
float
timer
=
0.0;
float
speed
=
0.06;
Dot(float
x,
float
initX
=
x;
initY
=
y;
currentX
=
currentY
=
initSize
=
currentSize
initColor
=
currentColor
}
void
setSize() {
currentSize
}
void
setPosition() {
currentY
=
}
void
setColor() {
currentColor
}
void
update() {
timer
+=
speed;
}
void
show() {
fill(currentColor, 100, 100);
ellipse(currentX, currentY, currentSize, currentSize);
}
}
Wie es funktioniert?
1.11. Spielen Sie mit der Verarbeitung
=
60;
50;
=
80;
y,
float
s,
int
x;
y;
s;
=
s;
c;
=
c;
=
initSize
+
sizeRange
initY
+
positionRange
=
int(initColor
+
c) {
sin( timer );
*
cos( timer
2);
*
*
ColorRange
sin( timer ));
*
SunFounder Da Vinci Kit
(Fortsetzung der vorherigen Seite)
433

Werbung

Inhaltsverzeichnis
loading

Verwandte Produkte für SunFounder Da Vinci Kit

Diese Anleitung auch für:

Davinci-kit-for-raspberry-pi

Inhaltsverzeichnis