{"id":21583,"date":"2021-03-02T17:53:04","date_gmt":"2021-03-02T22:53:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/opengl-circle-draw-web-development-root-by-sayed-ahmed\/"},"modified":"2021-03-02T17:53:04","modified_gmt":"2021-03-02T22:53:04","slug":"opengl-circle-draw-web-development-root-by-sayed-ahmed","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=21583","title":{"rendered":"OpenGL Circle Draw #Web Development #Root #By Sayed Ahmed"},"content":{"rendered":"<pre>in C\/C++\r\n\/\/ Create the circle in the coordinates origin\r\nconst int sides = 20;  \/\/ The amount of segment to create the circle\r\nconst double radius = 5; \/\/ The radius of the circle\r\n\r\nglBegin(GL_LINE_LOOP);\r\n\r\n  for (int a = 0; a &lt; 360; a += 360 \/ sides)\r\n  {\r\n    double heading = a * 3.1415926535897932384626433832795 \/ 180;\r\n    glVertex2d(cos(heading) * radius, sin(heading) * radius);\r\n  }\r\n\r\nglEnd();\r\n\r\n---\r\n\r\nin C# and TAO FrameWork<\/pre>\n<pre>\/\/ Create the circle in the coordinates origin\r\n  for (int a = 0; a &lt; 360; a += 360 \/ sides)\r\n  {\r\n    heading = a * MathEx.deg2Rad;\r\n    vertices.Add(new Vector3d(Math.Cos(heading) * this.radius, Math.Sin(heading) * this.radius, position.Z));\r\n  }\r\n\r\nRendering<\/pre>\n<pre>Gl.glBegin(Gl.GL_LINE_LOOP);\r\n  for (int i = 0; i &lt; vertices.Count; i++)\r\n    Gl.glVertex3dv(vertices[i]);\r\nGl.glEnd();\r\n\r\nReference:\r\nhttp:\/\/www.opengl.org\/discussion_boards\/showthread.php\/169668-How-to-draw-circle\r\n\r\n\r\n\r\n<\/pre>\n<p> From: http:\/\/sitestree.com\/?p=951<br \/> Categories:Web Development, Root, By Sayed Ahmed<br \/>Tags:<br \/> Post Data:2014-04-06 01:01:42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>in C\/C++ \/\/ Create the circle in the coordinates origin const int sides = 20; \/\/ The amount of segment to create the circle const double radius = 5; \/\/ The radius of the circle glBegin(GL_LINE_LOOP); for (int a = 0; a &lt; 360; a += 360 \/ sides) { double heading = a * &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=21583\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-21583","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10541,"url":"http:\/\/bangla.sitestree.com\/?p=10541","url_meta":{"origin":21583,"position":0},"title":"Example illustrating inheritance and abstract classes","author":"","date":"August 29, 2015","format":false,"excerpt":"*********************************** # Example illustrating inheritance and abstract classes. \u00a0\u00a0\u00a0 * Shape.java The parent class (abstract) for all closed, open, curved, and straight-edged shapes. \u00a0\u00a0\u00a0 * Curve.java An (abstract) curved Shape (open or closed). \u00a0\u00a0\u00a0 * StraightEdgedShape.java A Shape with straight edges (open or closed). \u00a0\u00a0\u00a0 * Measurable.java Interface defining classes\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10539,"url":"http:\/\/bangla.sitestree.com\/?p=10539","url_meta":{"origin":21583,"position":1},"title":"Example illustrating inheritance and abstract classes","author":"","date":"August 2, 2015","format":false,"excerpt":"illustrating inheritance \u098f\u09ac\u0982 abstract classes \u098f\u09b0 \u0989\u09a6\u09be\u09b9\u09b0\u09a3 Shape.java \u09b8\u09ac, \u09ac\u09a6\u09cd\u09a7 \u0996\u09cb\u09b2\u09be, \u09ac\u09be\u0981\u0995\u09be, \u098f\u09ac\u0982 \u09b8\u09cb\u099c\u09be \u09aa\u09be\u09b0\u09cd\u09b6\u09cd\u09ac\u09c7 \u09a7\u09be\u09b0\u09ac\u09bf\u09b6\u09bf\u09b7\u09cd\u099f \u0986\u0995\u09be\u09b0 \u098f\u09b0 \u099c\u09a8\u09cd\u09af \u09aa\u09cd\u09af\u09be\u09b0\u09c7\u09a8\u09cd\u099f \u0995\u09cd\u09b2\u09be\u09b8 (\u09b8\u09be\u09b0\u09be\u0982\u09b6)\u0964 Curve.java \u098f\u0995\u099f\u09bf (\u09b8\u09be\u09b0\u09be\u0982\u09b6) \u09ac\u09be\u0981\u0995\u09be \u0986\u0995\u09be\u09b0 (\u0996\u09cb\u09b2\u09be \u09ac\u09be \u09ac\u09a8\u09cd\u09a7)\u0964 StraightEdgedShape.java \u09b8\u09b0\u09be\u09b8\u09b0\u09bf \u09a7\u09be\u09b0 \u09b8\u09ae\u09cd\u09ac\u09b2\u09bf\u09a4 \u098f\u0995\u099f\u09bf \u0986\u0995\u09c3\u09a4\u09bf (\u0996\u09cb\u09b2\u09be \u09ac\u09be \u09ac\u09a8\u09cd\u09a7)\u0964 Measurable.java \u09aa\u09b0\u09bf\u09ae\u09be\u09aa\u09af\u09cb\u0997\u09cd\u09af \u098f\u09b2\u09be\u0995\u09be\u09af\u09bc \u0987\u09a8\u09cd\u099f\u09be\u09b0\u09ab\u09c7\u09b8 \u09a1\u09bf\u09ab\u09be\u0987\u09a8\u09bf\u0982 \u0995\u09cd\u09b2\u09be\u09b8\u0964 Circle.java \u098f\u0995\u099f\u09bf \u09ac\u09c3\u09a4\u09cd\u09a4 \u09af\u09be \u0986\u0995\u09be\u09b0\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10212,"url":"http:\/\/bangla.sitestree.com\/?p=10212","url_meta":{"origin":21583,"position":2},"title":"Multithreaded Graphics and Double Buffering","author":"","date":"August 25, 2015","format":false,"excerpt":"ShipSimulation.java\u00a0 Illustrates the basic approach of multithreaded graphics whereas a thread adjusts parameters affecting the appearance of the graphics and then calls repaint to schedule an update of the display. \u00a0 import java.applet.Applet; import java.awt.*; public class ShipSimulation extends Applet implements Runnable { \u00a0 ... \u00a0 \u00a0 public void run()\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26567,"url":"http:\/\/bangla.sitestree.com\/?p=26567","url_meta":{"origin":21583,"position":3},"title":"Example illustrating inheritance and abstract classes #Programming Code Examples #Java\/J2EE\/J2ME #Object Oriented Programming","author":"Author-Check- Article-or-Video","date":"April 28, 2021","format":false,"excerpt":"*********************************** # Example illustrating inheritance and abstract classes. * Shape.java The parent class (abstract) for all closed, open, curved, and straight-edged shapes. * Curve.java An (abstract) curved Shape (open or closed). * StraightEdgedShape.java A Shape with straight edges (open or closed). * Measurable.java Interface defining classes with measurable areas. *\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26860,"url":"http:\/\/bangla.sitestree.com\/?p=26860","url_meta":{"origin":21583,"position":4},"title":"Multithreaded Graphics and Double Buffering #Programming Code Examples #Java\/J2EE\/J2ME #Java Threads","author":"Author-Check- Article-or-Video","date":"May 3, 2021","format":false,"excerpt":"ShipSimulation.java Illustrates the basic approach of multithreaded graphics whereas a thread adjusts parameters affecting the appearance of the graphics and then calls repaint to schedule an update of the display. import java.applet.Applet; import java.awt.*; public class ShipSimulation extends Applet implements Runnable { ... public void run() { Ship s; for(int\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10329,"url":"http:\/\/bangla.sitestree.com\/?p=10329","url_meta":{"origin":21583,"position":5},"title":"Position circles down the diagonal so that their borders","author":"","date":"August 26, 2015","format":false,"excerpt":"import java.awt.*; import java.applet.Applet; \/** Position circles down the diagonal so that their borders \u00a0*\u00a0 just touch. Illustrates that AWT components are \u00a0*\u00a0 rectangular and opaque. \u00a0 *\/ public class CircleTest2 extends Applet { \u00a0 public void init() { \u00a0\u00a0\u00a0 setBackground(Color.lightGray); \u00a0\u00a0\u00a0 setLayout(null); \/\/ Turn off layout manager. \u00a0\u00a0\u00a0 Circle\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/21583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21583"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/21583\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21583"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}