Questions tagged [rasterizing]

Rasterization (or rasterization) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (pixels or dots) for output on a video display or printer, or for storage in a bitmap file format.

In normal usage, the term refers to the popular rendering algorithm for displaying three-dimensional shapes on a computer. Rasterization is currently the most popular technique for producing real-time 3D computer graphics. Real-time applications need to respond immediately to user input, and generally need to produce frame rates of at least 30 frames per second to achieve smooth animation.

Definition

278 questions
3
votes
1 answer

How do I use gdal_grid with points

I am using gdal_grid to make an elevation model of some 3d surfaces. I can do it using a geojson-file with this command: ds2 = gdal.Grid('outputfile.tif', 'inputfile.geojson', format = 'GTiff', algorithm = 'linear:radius=0') This works fine, but I…
Little geek
  • 592
  • 8
  • 22
3
votes
1 answer

How to "translate" the Midpoint Circle Algorithm into matplotlib?

I need to implement the Midpoint Circle Algorithm in matplotlib, so that a circle is rasterized on a square grid of 200x200 cells. Please also refer to my other question on the subject. Thanks to this answer, I was able to find some code which I…
FaCoffee
  • 7,609
  • 28
  • 99
  • 174
3
votes
1 answer

Ray tracing: Bresenham's vs Siddon's algorithm

I'm developping a tool for radiotherapy inverse planning based in a pencil-beam approach. An important step in these methods (particularly in dose calculation) is a ray-tracing from many sources and one of the most used algorithms is Siddon's one…
3
votes
0 answers

How to rasterize "big" PDF files without losing thin lines?

I'm trying (in a script on a linux server) to shrink and rasterize several thousands PDF files that come from various CAD/CAM softwares and represent "big" drawings (as in, 800x600mm or the like) with lots of thin lines (as in, similar to a 0.2mm…
Luke404
  • 10,282
  • 3
  • 25
  • 31
3
votes
2 answers

Canvas 'tainted' after drawing SVG

Similar questions have been asked, and the REASON for the problem is well understood, what I'm asking for is alternatives or work-arounds: What I'd like to do is get a data-URL out of a canvas that has an SVG document drawn onto it. I've tried all…
trjh2k2
  • 41
  • 3
2
votes
2 answers

Rasterizing an ellipse

Is there a efficient algorithm out there to find the indicies of pixels in a general ellipse? Essentially, what I want to do is to find the indicies in a two dimensional array that corresponds to a parameterized ellipse that spans over the "2-D…
2
votes
2 answers

Getting scan lines of arbitrary 2d triangle

How would one go about retrieving scan lines for all the lines in a 2D triangle? I'm attempting to implement the most basic feature of a 2D software renderer, that of texture mapping triangles. I've done this more times than i can count using…
Knetic
  • 2,099
  • 1
  • 20
  • 34
2
votes
1 answer

How to Ensure That All Letters of geom_text Fit the ggplot2 Box

The simlified issue is as follows: library(dplyr) library(ggplot2) data.frame(x=c(1,10,100,1000,10000), nms = c("A","B","C","D","E")) %>% ggplot(aes(x=x, y=nms)) + geom_bar(stat = "identity") + geom_text(aes(label = x), vjust…
asd-tm
  • 3,381
  • 2
  • 24
  • 41
2
votes
1 answer

3D triangle rasterization into voxel grid

Prologue: This is Q&A to cover 3D triangle rasterization into voxel grid I was asked for in order to solve a different problem related to material erosion/removal during manufactoring process simulation. The main Idea behind this question is how to…
Spektre
  • 49,595
  • 11
  • 110
  • 380
2
votes
0 answers

Have slight issue with edge in self made triangle rasterizer C++

The triangles are mostly ok but one or 2 triangles would have a missing pixel between them which probably means theres a issue with edge cases but i cant figure it out the white spaces only happen on the edge of the triangles so i assume there is…
krater
  • 21
  • 1
2
votes
1 answer

D3D11 Half Pixel distorting objects?

I have had this problem with D3D and OpenGL for years (probably for different reasons!). This happens no matter how I draw it. There is another problem not shown in the gif below, which is the a single pixel of a rectangle not being…
2
votes
0 answers

Understanding modified version of Bresenham's algorithm?

I was recently reading a paper by Alois Zingl about rasterization algorithms. I didn't get very far before I totally lost understanding of the algorithm. From my research I believe this algorithm is some kind of version of Bresenham's line drawing…
James51332
  • 164
  • 11
2
votes
2 answers

Better shading on BW display while rendering filled surfaces

Prologue I finally got around HW incompatibility between AT32UC3xxxxx and SSD1306 OLED I2C display (both have HW bugs making them incompatible) allowing me to use HW I2C at 400KBaud (~26.6ms per frame). So I decided to rewrite my old driver for this…
Spektre
  • 49,595
  • 11
  • 110
  • 380
2
votes
1 answer

C++ 2D Graphics: Flat Bottom Triangle Rasterization

I'm trying to build a simple 2D application on the Windows Console using C++ to display various primitives so I started with the most basic one: a triangle. I can display the triangle's outline and vertices correctly but I'm having problems with…
136
  • 1,083
  • 1
  • 7
  • 14
2
votes
1 answer

How do SVG path rendering algorithms ensure that areas are not painted twice?

I was reading about path rasterization algorithms, trying to figure out how the intersecting parts in a SVG path are not drawn twice. Looking at the image below of a self intersecting path which was drawn translucent rgba(0,0,228,78), we can see…
Julius
  • 1,155
  • 9
  • 19