This commit is contained in:
Greg Shuflin
2026-07-06 19:32:37 -07:00
parent 45cd9f7f49
commit 8285e91b96
+19 -1
View File
@@ -9,5 +9,23 @@ fn view(app: &App) {
draw.background().color(PLUM);
draw.ellipse().color(STEEL_BLUE);
draw.rect().color(STEEL_BLUE);
let points = (0..50).map(|i| {
let x = i as f32 - 25.0;
let point = pt2(x, x.sin()) * 20.0;
(point, RED)
});
draw.polyline().weight(3.0).points_colored(points);
let radius = 160.0;
let step = 45;
let points = (0..=360).step_by(step).map(|i| {
let radian = deg_to_rad(i as f32);
let x = radian.cos() * radius;
let y = radian.sin() * radius;
(pt2(x, y), LIGHT_STEEL_BLUE)
});
draw.polygon().points_colored(points).x_y(-100.0, -200.0);
}