Name the fractal created by the following code. Clearly explain
how the algorithm works for creating the image shown, start your
discussion with the equation,
(d) Name the fractal created by the following code. [6 marks] Clearly explain how the algorithm works for creating the image shown, start your discussion with the equation, 2 Znew = Zola +C #include "stdafx.h" static void display(void) #include <freeglut.h> { #include <math.h> float s=0.01; void display(void); glClear(GL_COLOR_BUFFER_BIT); for(float x=-2;x<=0.8;X+=s) { int main(int argc, char *argv[]) for(float y=-1.2;y<=1.2;y+=s) { { float cx=x, cy=y, a=0,b=0, at=0,g=0; glutInitWindowSize(512,384); while((sqrt((a*a)+(b*b))<2.0)&&(8<=1.0)) { glutInitWindowPosition (100, 100); atra; glutInit(&argc, argv); a=(a*a)-(b*b)+cx; glutInitDisplayMode (GLUT_RGB b=(2.0*at*b)+cy; GLUT_SINGLE); g+=0.067; glutCreateWindow("Fractal"); } glMatrixMode (GL_PROJECTION); glColor3f(1-8,1-8,1-8); gluOrtho2D(-2.0.0.8, -1.2, 1.2); glRectf(x,y,X+s,y+5); giClearColor(0,0,0,1); } glutDisplayFunc(display); } glutMainLoop(); glFlush(); return 0; } } Fractal
Name the fractal created by the following code. Clearly explain how the algorithm works for creating the image shown, st
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Name the fractal created by the following code. Clearly explain how the algorithm works for creating the image shown, st
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!