//! Simple square example demonstrating basic turtle graphics use macroquad::prelude::*; use turtle_lib_macroquad::*; #[macroquad::main("Turtle Square")] async fn main() { // Create a turtle plan let mut plan = create_turtle(); plan.shape(ShapeType::Turtle); plan.set_speed(1500); plan.set_pen_width(0.5); // Draw a 5-pointed star pattern repeatedly for _i in 0..50000 { plan.forward(200.0); plan.circle_left(10.0, 72.0, 1000); plan.circle_right(5.0, 360.0, 1000); plan.circle_left(10.0, 72.0, 1000); } // Set animation speed plan.set_speed(300); // Create turtle app with animation (speed = 100 pixels/sec) let mut app = TurtleApp::new().with_commands(plan.build()); // Main loop loop { clear_background(WHITE); // Update and render app.update(); app.render(); next_frame().await } }