Home
О нас
Products
Services
Регистрация
Войти
Поиск
spisers
@spisers
July 2021
1
10
Report
составить программу которая рисует 5 окружностей голубого цвета с центром в точке (200,200) и радиусами 30,40,50,60,70
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
ad1997ya
На C++ (OpenGL)
#include <math.h>
#include <glut.h>
void Draw ()
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (0.7,0.7,1);
glTranslatef (200,200,0);
glBegin (GL_POINTS);
for (int i=0,R=30;i<5;i++,R+=10)
{
for (float x=-R;x<R;x+=0.01)
{
glVertex2f (R*sin(x),R*cos(x));
}
}
glEnd ();
glutSwapBuffers ();
}
void Init ()
{
glClearColor (1,1,1,1);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho (0,400, 0,400, 0,400);
glMatrixMode (GL_MODELVIEW);
}
int main (int argc,char** argv)
{
glutInit (&argc,argv);
glutInitDisplayMode (GLUT_DOUBLE|GLUT_RGB);
glutInitWindowSize (400,400);
glutInitWindowPosition (50,50);
glutCreateWindow ("Окружности");
glutDisplayFunc (Draw);
Init ();
glutMainLoop ();
return 0;
}
2 votes
Thanks 2
More Questions From This User
See All
spisers
July 2022 | 0 Ответы
5 6 abagulnena asabovyh prykazak
Answer
spisers
August 2021 | 0 Ответы
rasstoyanie mezhdu gorodami turist proehal za 2 dnya v 1 den on proehal 20vsego
Answer
spisers
August 2021 | 0 Ответы
ch bolshejnajdite skorost 1 ogo uchityvaya chto v v punkt b oni pribuli odnovremen
Answer
spisers
July 2021 | 0 Ответы
sostavit programmu kotoraya vyvodit na ekran znachenie vyrazheniya x v stepeni 10 g
Answer
spisers
July 2021 | 0 Ответы
sostavit programmu kotoraya nahodit naimenshee naturalnoe chislo n pri kotorom 2
Answer
рекомендуемые вопросы
rarrrrrrrr
August 2022 | 0 Ответы
o chem dolzhny pozabotitsya v pervuyu ochered vzroslye pri organizacionnom vyvoze n
danilarsentev
August 2022 | 0 Ответы
est dva stanka na kotoryh vypuskayut odinakovye zapchasti odin proizvodit a zapcha
myachina8
August 2022 | 0 Ответы
najti po grafiku otnoshenie v3v1 v otvetah napisano 9 no nuzhno reshenie
ydpmn7cn6w
August 2022 | 0 Ответы
Choose the correct preposition: 1.I am fond (out,of,from) literature. 2.where ar...
millermilena658
August 2022 | 0 Ответы
opredelite kak sozdavalas i kto sozdaval arabskoe gosudarstvo v kracii
MrZooM222
August 2022 | 0 Ответы
ch ajtmanov v rasskaze krasnoe yabloko ispolzuet metod rasskaz v rasskaze opi
timobila47
August 2022 | 0 Ответы
kakovo bylo naznachenie kazhdoj iz chastej vizantijskogo hrama pomogite pozhalujsta
ivanyyaremkiv
August 2022 | 0 Ответы
moment. 6....
pozhalujsta8b98a56c0152a07b8f4cbcd89aa2f01e 97513
sarvinozwakirjanova
August 2022 | 0 Ответы
pomogite pozhalusto pzha519d7eb8246a08ab0df06cc59e9dedb 6631
×
Report "составить программу которая рисует 5 окружностей голубого цвета с центром в точк..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <math.h>
#include <glut.h>
void Draw ()
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f (0.7,0.7,1);
glTranslatef (200,200,0);
glBegin (GL_POINTS);
for (int i=0,R=30;i<5;i++,R+=10)
{
for (float x=-R;x<R;x+=0.01)
{
glVertex2f (R*sin(x),R*cos(x));
}
}
glEnd ();
glutSwapBuffers ();
}
void Init ()
{
glClearColor (1,1,1,1);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
glOrtho (0,400, 0,400, 0,400);
glMatrixMode (GL_MODELVIEW);
}
int main (int argc,char** argv)
{
glutInit (&argc,argv);
glutInitDisplayMode (GLUT_DOUBLE|GLUT_RGB);
glutInitWindowSize (400,400);
glutInitWindowPosition (50,50);
glutCreateWindow ("Окружности");
glutDisplayFunc (Draw);
Init ();
glutMainLoop ();
return 0;
}