English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i would to draw a circle inside circle , and each circle colored by progressive by c++ .

please yahoo answers

2006-11-14 05:51:29 · 2 answers · asked by Shorbaji 1 in Science & Mathematics Mathematics

no i know that !!

but my question is HOW ?

I need the Code

2006-11-14 06:05:17 · update #1

2 answers

It's the graphics package that you need to be concerned with not the C++ language. Some packages allow you to specify a center and a radius, other want and array[x,y]. You can generated the array with simple sin and cos. Just write a loop and increment your angle from 0 to 2pi in whatever steps you want and then
loop on angle:
x=r*cos(angle)
y=r*sin(angle)

This generates a polygon approximation. For a large number of sides, say 100, it's very very close.

2006-11-14 05:59:02 · answer #1 · answered by modulo_function 7 · 0 0

look into graphics.h for the functions. Look into these sites to set up for graphics mode.

www.cprogramming.com, www.gamedev.net, www.programmingtutorials.com.

Depends if you want Dos graphics or windows, the code is very different. You can't just say I want to code, it depends what mode your talking about.

2006-11-17 02:27:23 · answer #2 · answered by Arkane Steelblade 4 · 0 0

fedest.com, questions and answers