if we make a circle taking (0,0) as the center and 100 as the radius.
then we are able to view only the 4th quadrant of the circle.
how can we view the whole circle without changing the coordinates and radius of the circle?
Your grahics system appears to have the origin (0,0) in a corner. This is normal. Some systems use the upper left while others use the lower left as the origin.
You need to move the thing over. Try drawing at (100,100) instead. I have no idea what your coordinate system is or the range of your X/Y axes.
It's not. Those coordinates are not virtual coordinates for a viewport. They are physical coordinates of the screen. Doing what you ask is like accessing negative elements of an array.
Unless the coordinates you are passing are for a viewport. In which case, you just need to move the viewport.
You know, I think helios has been extraordinarily patient with this so far. Don't keep running him in circles. It is time to go ask your teacher for help.
If you are using the old Borland BGI library, there is no reason you can't just adjust the center of the circle to somewhere else:
1 2 3 4
// center (x, y) = (150, 150)
// radius = 100
circle( 150, 150, 100 );
// Voilà! Je peux voir le cercle entier!
If you are plotting the circle yourself, just add the center offset [(150, 150) in my example above] to the coordinate of each point before you plot it.
Well, it's not like I was annoyed or anything. The question doesn't really belong in this forum, though.
I assume Duoas knows enough about that library to know if it implements a viewport or not. If you are using Borland, do what he suggested. Otherwise, consult the documentation for the library you're using, but I don't really see any reason not to move the center of the circle.
It's been said already...if you really want, you can hide it like this:
1 2 3 4 5 6 7
void circle( int x, int y, unsignedint r )
{
// make the origin in the middle of the screen
library::circle( x + SCREENWIDTH/2, y + SCREENHEIGHT/2, r );
}
// ...
circle( 0, 0, 100 );