Questions tagged [drawing]
The drawing tag has no summary.
16 questions
2 votes
0 answers
124 views
How do freehand vector drawing tools typically decide where to place the control points?
I'm devising an algorithm to take a freehand curve and make a bezier spline from it. I can do this already just fine, but it's a naive implementation that creates about as many bezier curves as there ...
0 votes
0 answers
120 views
Algorithm for drawing generalised circles
A generalised circle is either a circle in the plane or a line. The general equation of one is: $$A(x^2 + y^2) + Bx + Cy + D=0,$$ where $4AD - B^2 - C^2 \leq 0$. This can be checked by completing the ...
2 votes
2 answers
1k views
Using Bresenham's circle algorithm (or another alternative algorithm) to draw an arc
I'm trying to create some graphic functions for a ZX Spectrum (Z80) machine in assembler. I already have the basics except for the arc. I need a fast algorithm to draw an arc, ideally one that uses ...
2 votes
1 answer
1k views
Bresenham circle drawing algorithm, compute the distance?
In the Bresenham circle drawing algorithm, we have to choose between the top and bottom pixel, but what we always do is using the circle's equation ($f(x, y) = x^2 + y^2 = r^2$) to determine which of ...
1 vote
0 answers
39 views
How to handle object drawables?
Currently the graphics API I am using is Vulkan, but I am trying to find a general enough way to represent the following. In graphics, drawing can be generalized as: Get vertex buffers and send them ...
3 votes
0 answers
97 views
Why my cosine interpolation of a cube's face doesn't work?
NB please : executable use cases are available at the end of this question. I begin this question by showing you the problems of my program, then I explain how the latter works, and finally I end up ...
4 votes
1 answer
2k views
How to use 32 bit Integers for Element Indices in WebGL 1.0?
WebGL 1.0 specification does not allow to create 32-bit index buffers. Now I'm in trouble, I'm trying to render huge objects with 100 thousands to 1 million indices. In OpenGL this is no issue at all, ...
5 votes
2 answers
873 views
Blit and scroll
Could anyone please explain to me how drawing works with respect to scrolling? Suppose there is a window, which has an area where one can draw to (a "canvas"). Are there two copies of this canvas? ...