Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [2d-graphics]

The tag has no usage guidance.

1
vote
1answer
82 views

How can I transform an ellipse into a circle?

I have an ellipse which has -45 degree axis. How can I transform the ellipse into a circle? Can I use shear transformation along the x/y axis?
2
votes
0answers
64 views

Constraining a Polyline to Look Smooth

What are the mathematical constraints required for a polyline, i.e., a piecewise linear curve, to appear as a smooth curve to human vision? I've discovered one document that specifies only that the ...
3
votes
1answer
49 views

My 2D translation matrix causes the box to be off screen when it shouldnt be

Now I know this isn't the way this is normally done so please bear with me. I am doing this this way so I know I have a solid conceptual understanding of everything that goes beyond example code. I ...
2
votes
0answers
30 views

Transforming arcs and perspective change

I have a SVG with group of independent arcs that move around common origin. On user event those arcs can change both their radii and start/end angles. On other user event the user can change view from ...
0
votes
1answer
97 views

Turtle in Python

I am new to turtle library in python . I created a pattern using turtle however I observed margin gaps around the rectangle that I created . How can I remove them ?
1
vote
1answer
174 views

Drawing Directed Lines (with arrow endings)

I am working on a simple graph viewer with OpenGL. My problem with is directed edges. I tried to draw arrow endings with GL_TRIANGLES but somehow my calculations are off. I've used direction cosine ...
4
votes
1answer
101 views

How to apply wire texture for realistic rendering of embroidery?

I am building an algorithm which takes a bitmap image as input and render the image as an embroidery design. The different steps are : Vectorize the image, I keep only 5 colors (Done) Generate ...
1
vote
0answers
353 views

How Skia uses OpenGL backend?

Skia 2D's one notable backend in OpenGL, but how does it work under the hood to render? Say, we need to draw an anti-aliased circle. Does Skia: make a quad (using 2 triangles) and paint the circle ...
1
vote
1answer
270 views

How can I draw a filled circle on a grid with the less rectangle as possible?

I have a grid with a variable width/height spacing. Let's say 100 horizontal lines separated by 80 pixels and 100 hundred vertical lines separated by 50 pixels. Each cell of the grid in my logic have ...
1
vote
0answers
47 views

File missing in Corel draw [closed]

I have downloaded Corel draw but I don't know why some file are missing in it . So I am unable to install it. These files are :-. 1. Common_retail_x64.msi. 2. Common_x64.cab. 3. Ghostscript.msi. I ...
1
vote
0answers
51 views

Is there an education tool that teachs computer graphics ? [closed]

I am wondering if there is any outsourced or licensed tool that teachs the fundamentals of computer graphics theories/programming. Does such a tool even exists ? Thanks in advance
1
vote
1answer
125 views

Midpoint Algorithm Fast Direction

I've been exploring the Midpoint algorithm for drawing lines and curves, and I have a quick question: How should you determine the fast direction for a curve? I've seen that if the shape is simple, ...
5
votes
3answers
403 views

Rounding corners of polygon given vertices of its corners

Given a polygon (regular or irregular, convex or concave), I want to round its corner, with a given radius; let's say 'x'. I have the code to draw an arc given 2 points, but how can I find the start ...
4
votes
1answer
174 views

Determining Vanishing Points of edges of Triangle using given Point

Due to perspective foreshortening, the projections of parallel lines (1D geometric objects) meet in their vanishing point (a 0D geometric object). Higher dimensional geometric objects also has higher ...
1
vote
1answer
131 views

Fill an irregular region with 2D shapes

I am creating a 2D CAD drawing generator in C# using .netDXF library. Given a area I want to fill it with rectangles/circles (convex). For example, the regions marked with numbers in below image. This ...
1
vote
0answers
43 views

Rectangle bounds of isometric object to isometric bounds

This might sound confusing, but this is what I'm trying to achieve: project to: I already have an algorithm in my mind, where we simply detect the corners touching the Cartesian rectangle and ...
5
votes
1answer
349 views

Explanation of the Marching Squares saddle points resolution

I was reading the Wikipedia entry on Marching Squares, and was confused by the explanation of the saddle point disambiguation: Ambiguous Case: Basically, given the saddle points, the ambiguity is ...
4
votes
0answers
341 views

Can draw.io type flowcharts be programmed?

I made this flowchart with draw.io: It was the first chart I made so it took me a while to make it. I need to be able to dynamically generate variations of this diagram programmatically. I wold need ...
3
votes
1answer
50 views

Successive lineTo(x, y) in JavaScript

When I was doing some graphic designing with JavaScript, I saw this strange behaviour. When I ran the following code (with proper HTML and JavaScript of course), ...
4
votes
1answer
401 views

What if we don't mention Modelview and projection matrix?

So I've been learning opengl for some weeks now and managed to understand all the viewing pipelines. As far my understanding goes we need to bring the object to world space and then the world space to ...
7
votes
2answers
683 views

Converting cartesian pixels to polar pixels

(I've largely revamped this entire question, though the motivation remains the same.) revised question I want to convert a raster of cartesian pixels into polar pixels. Is there a sensible ...
1
vote
0answers
46 views

distribute the bounding area into grid space

I have a bounding area of a contour after the slicing operation. Now to generate the tool-path over the contour, I need to distribute the bounding area into grid space so that each each cell maintain ...
1
vote
1answer
77 views

Optimal 2D graphics resource [closed]

I am a some-what experienced programer, and I have been working on creating a 3D graphics engine utilizing the OpenGL system, primarily focused on use in games. However, I also want to do some work ...
2
votes
0answers
56 views

Perspective Translation Of Quadrilateral

I have mapped four rectangular point(R1->R4) to four quadrilateral points(Q1->Q4) to generate a perspective view. Now I have to translate quadrilateral in x and y direction while maintaing perspective ...
3
votes
2answers
437 views

Line segments overlapping

I have implemented line segments intersetion test and at the very same test I want to include the fact that if two line segments overlap each other partially or fully , it will be flagged as no ...