# Search results for query: *

1. ### Diagonal line plotting in C

ok i see, yes that's a good formula but I am not sure how it would be implemented into the code? i have sex x = x1 this wouldn't work with this formula, i could pre determine the graident from the four points but I am not sure what to do to get y2 to move vertically while y1 remains constant??
2. ### Diagonal line plotting in C

this is quite a simple problem,what i am trying to do is plot a line between any two points on my image, i can plot horizontal lines fine. below is the part of my code to for the line... int x1 = 92, y1 = 35, x2 = 150, y2 = 55; //line between two points for (x = x1; x <= x2; x++)...
3. ### 2D image generator using C and nxview

Thanks so much for the help, i was wondering if you could check out my updated version where i took your advise its also in programming and is called 2D image generator and modification using C, updated part 2 (drawing a line) thanks again!
4. ### 2D image generator and modification using C, updated part 2 (drawing a line)

hello, Part of a little project of mine consists of writing C code to build a image file in .ppm format which can be viewed by the simple program xnview. The image size is going to be 256 x 128. My code below generates a image with a smooth transtiton/graident between very dark red to light...
5. ### 2D image generator using C and nxview

hello, Part of a little project of mine consists of using arrays, loops and writing files, in C to build a image file in .ppm format which can be viewed by the simple program xnview. The image size is going to be 256 x 128. I can use notepad to create simple images of flags ect. but am...