<p>What you are looking for is a way to get access to individual pixels in an image, in a way that you can modify those pixels with CPU code.</p>

<p>Once you have that you'll want to find software rendering / software rasterization methods.</p>

<p>A great place to start would be reading up in the various bresenham algorithms.</p>

<p>There is a lot of info out there on that. Here is one article for instance:
<a href="http://blog.demofox.org/2015/01/17/bresenhams-drawing-algorithms/" rel="nofollow">http://blog.demofox.org/2015/01/17/bresenhams-drawing-algorithms/</a></p>

CC BY-SA 3.0
2016-03-17T00:03:55.267Z
thanks a lot for your help in this subject . It covers the basics that i need to continue what im searching for . i am grateful  for the help.
charle
CC BY-SA 3.0
2016-03-17T00:14:55.893Z
Glad to hear! Sometimes it's hard to know what to search for.
Alan Wolfe
CC BY-SA 3.0
2016-03-12T20:11:20.327Z
2016-03-12T20:11:20.327Z
Alan Wolfe
<p>I've been researching for quite a while and I couldn't find any explanation or at least a how to create a vector graphic application (specifically in windows) where I can create a 3D vector shape, say a box. I know there is OpenGL and DirectX for that and the new Vulkan API but I don't wan't to use those APIs and libraries. What I am asking is where can I find examples or at least tutorials for creating custom made API graphics library for the C++ language. If there is not a way in C++ language then any other way to do it. By example masm or nasm Assembly language.</p>

<p>If my question is too broad please specify any additional information you need to be able to answer my question.</p>

CC BY-SA 3.0
2016-03-10T04:58:27.120Z
To be clear, are you looking for an existing software renderer for vector graphics, or are you looking to learn how to write a software renderer for vector graphics on your own?
Nathan Reed
CC BY-SA 3.0
2016-03-10T04:59:42.887Z
i am looking to write a software renderer for vector graphics on my own
charle
CC BY-SA 3.0
2016-03-10T06:19:25.380Z
Are you trying to make a program that outputs an image file? Or are you trying to make a program that shows the vector shapes on the screen and lets you edit them in real time?  What operating system are you using?
Alan Wolfe
CC BY-SA 3.0
2016-03-10T12:08:33.670Z
I'm afraid it is not possible for us to narrow the question down for you, as we do not know specifically what you want. Is there a similar application that already exists for comparison, so we can see what you intend to build? What will the finished program be used for? Will a shape be displayed as a wire frame, a solid, with flat shading or realistic lighting? Do you want to produce images in real time or slowly generate high quality images?
trichoplax is on Codidact now
CC BY-SA 3.0
2016-03-10T14:03:53.507Z
i wan't to create a 3D program where the only thing it does is showing a box with 8 vertex points , 12 edges in wire frame . This program will be an executable for windows operating system 10 . I wan't to create this 'sample' structure program without using OpenGL, DirectX or Vulkan , only with custom code for the entire input , output of the program . That means creating the class methods for vertex and edges and a ouput system to the screen with vector graphics. It may be in CLI or MFC , it does not matter for me.
charle
CC BY-SA 3.0
2016-03-11T03:37:11.020Z
what is your reasoning for not wanting to use a graphics API? Without a graphics API you will be doing CPU software rendering which is slower and not the modern way to do graphics. The graphics APIs utilize the graphics card's hardware, that is all.  You really are best off using opengl, directx or similar, unless you have a really strange reason why you can't use them.
Alan Wolfe
CC BY-SA 3.0
2016-03-11T05:30:16.603Z
i want to learn the work flow and understand the logic in details. It's only for educational purpose . There is not any big work going on or idea . You can say that i am a maniac in knowing this things how they work down in detail and code. I can use a API and i know how , it's just for my own personal reason.
charle
CC BY-SA 3.0
2016-03-11T08:42:40.920Z
So I have re-interpreted the question as follows: *How to make the rasterizer of vector graphics yourself?* Does that sound about right? It hard to find a modern operating system functionality that allows you to manage everything yourself. Even the lowest level modern apis know how to draw lines for you.
joojaa
CC BY-SA 3.0
2016-03-12T17:02:06.673Z
joojaa , yes that is about what i wan't .
charle
CC BY-SA 3.0
2016-03-12T20:08:41.263Z
Ah ok Roger.  To help you out in googling or asking further questions, this might be referred to as software rendering or software rasterization.
Alan Wolfe
<c++><vectors>
Creating vector shapes using only C++
charle
# Creating vector shapes using only C++

(Asked by: username_0 on 2016-03-10)

I've been researching for quite a while and I couldn't find any explanation or at least a how to create a vector graphic application (specifically in windows) where I can create a 3D vector shape, say a box. I know there is OpenGL and DirectX for that and the new Vulkan API but I don't wan't to use those APIs and libraries. What I am asking is where can I find examples or at least tutorials for creating custom made API graphics library for the C++ language. If there is not a way in C++ language then any other way to do it. By example masm or nasm Assembly language.

If my question is too broad please specify any additional information you need to be able to answer my question.

**Tags:** c++, vectors

> **Comments:**
> **username_1**: To be clear, are you looking for an existing software renderer for vector graphics, or are you looking to learn how to write a software renderer for vector graphics on your own?  
> **username_0**: i am looking to write a software renderer for vector graphics on my own  
> **username_2**: Are you trying to make a program that outputs an image file? Or are you trying to make a program that shows the vector shapes on the screen and lets you edit them in real time?  What operating system are you using?  
> **username_3**: I'm afraid it is not possible for us to narrow the question down for you, as we do not know specifically what you want. Is there a similar application that already exists for comparison, so we can see what you intend to build? What will the finished program be used for? Will a shape be displayed as a wire frame, a solid, with flat shading or realistic lighting? Do you want to produce images in real time or slowly generate high quality images?  
> **username_0**: i wan't to create a 3D program where the only thing it does is showing a box with 8 vertex points , 12 edges in wire frame . This program will be an executable for windows operating system 10 . I wan't to create this 'sample' structure program without using OpenGL, DirectX or Vulkan , only with custom code for the entire input , output of the program . That means creating the class methods for vertex and edges and a ouput system to the screen with vector graphics. It may be in CLI or MFC , it does not matter for me.  
> **username_2**: what is your reasoning for not wanting to use a graphics API? Without a graphics API you will be doing CPU software rendering which is slower and not the modern way to do graphics. The graphics APIs utilize the graphics card's hardware, that is all.  You really are best off using opengl, directx or similar, unless you have a really strange reason why you can't use them.  
> **username_0**: i want to learn the work flow and understand the logic in details. It's only for educational purpose . There is not any big work going on or idea . You can say that i am a maniac in knowing this things how they work down in detail and code. I can use a API and i know how , it's just for my own personal reason.  
> **username_4**: So I have re-interpreted the question as follows: *How to make the rasterizer of vector graphics yourself?* Does that sound about right? It hard to find a modern operating system functionality that allows you to manage everything yourself. Even the lowest level modern apis know how to draw lines for you.  
> **username_0**: username_4 , yes that is about what i wan't .  
> **username_2**: Ah ok Roger.  To help you out in googling or asking further questions, this might be referred to as software rendering or software rasterization.  

---

## 1 answers

### Answer by username_2 on 2016-03-12. Score: 3

What you are looking for is a way to get access to individual pixels in an image, in a way that you can modify those pixels with CPU code.

Once you have that you'll want to find software rendering / software rasterization methods.

A great place to start would be reading up in the various bresenham algorithms.

There is a lot of info out there on that. Here is one article for instance:
<http://blog.demofox.org/2015/01/17/bresenhams-drawing-algorithms/>

> **Comments:**
> **username_0**: thanks a lot for your help in this subject . It covers the basics that i need to continue what im searching for . i am grateful  for the help.  
> **username_2**: Glad to hear! Sometimes it's hard to know what to search for.  

---

