rotate() फ़ंक्शन वर्तमान समन्वय प्रणाली को वर्तमान मूल के चारों ओर घुमाता है। ध्यान दें कि डिफ़ॉल्ट रूप से मूल कैनवास का ऊपरी बाएँ कोना है। कैनवास के केंद्र के चारों ओर घूमने के लिए, हमें पहले समन्वय प्रणाली का अनुवाद करना होगा, और फिर नए मूल के चारों ओर घूमना होगा। push() और pop() फ़ंक्शन क्रमशः समन्वय प्रणाली को सहेजते और पुनर्स्थापित करते हैं।
रोटेट: Revised by Darren Kessner. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: 2023 code, pre-2023 code. You can suggest improvements by contributing to the current website!