285 questions
0
votes
1
answer
62
views
How to render a curve, given a varying cross-section
I have a sequence of points that define a curve in 2d. I seek an algorithm to render this curve to a raster image, provided a cross-section that varies along the curve. The cross-section affects both ...
0
votes
1
answer
75
views
Converting Scaled Vector Graphics Object to Raster Texture (Sprite)
Suppose, I have a Pixi JS (v.8) Graphics object which is created from a vector (SVG) image. I've found how to convert it to a raster Texture object. It uses a scale of 1. But if I change the scale of ...
0
votes
0
answers
130
views
How exactly does OpenGL performs depth calculation for a pixel? Is it the same as rasterization?
I'm looking for information (ideally a quote from a piece of documentation) that explains exactly how OpenGL performs the depth test and whether this value is truly accurate or a numerical ...
1
vote
1
answer
84
views
How to skip edges shared between two triangles when conservative rasterization
When enabling conservative rasterization, there are lots of fragments generated from edges.
How to skip fragments generated from edges shared between two triangles?
0
votes
0
answers
83
views
Raster from rasterize() in R shows different values from polygon, values don't plot as expected
I am trying to rasterize a polygon so that I can perform some zonal statistics (namely, get average values of a variable using a buffer around a point). I'd like it to be at ~100m resolution but a ...
0
votes
1
answer
201
views
Getting rasterized text in html canvas
I have main canvas on which I draw another canvas which had a text written on it. When I saw the results, it appears that the text is rasterized and not smooth.
Here is the code I tried :-
const ...
-1
votes
2
answers
194
views
Extract a PDF Layout to Image without chaging lineweight in python [closed]
I'm working on a project where I need to extract images from a PDF layout that was originally exported from AutoCAD. The layout contains detailed drawings, specifically of solar modules, and I need ...
2
votes
1
answer
1k
views
Need help understanding top-left rasterization rule
I need help in understanding top-left rasterization rule. It sounds simple, but I have trouble understanding certain example cases.
Why one triangle has its corner pixel filled but other doesn't? (...
-1
votes
1
answer
90
views
why is this triangle shader that I wrote splitting into four?
I wrote a triangle shader with an edge function and tried to use weight to color it in, but the colors split into 4 separate triangles each with their own smaller version of the shader for some reason....
1
vote
2
answers
242
views
Convert lat,lon,data points to matrix (2D grid) at 0.5 degree resolution in Python
I have a geodataframe which I load in as follows:
gdf = gpd.GeoDataFrame(
ds.to_pandas(),
geometry=gpd.points_from_xy(ds["CENLON"], ds["CENLAT"]),
crs="EPSG:4326&...
0
votes
0
answers
92
views
Unexpected blank line after rasterizing sf object
After rasterizing the sf object and plotting it, I see unexpected blank lines both horizontally and vertically.
tmp_r <- fasterize(tmp_buf, afr_r, field = "rwi", fun = "first") |...
0
votes
1
answer
792
views
How do I convert a polygon to a raster so that the pixels are the same as the polgons
I have the following shape file and I want to convert the polygons into raster with pixels.
How do I do that so that the pixels have the same resolution (size) as the polygons (or close to it)?
...
0
votes
1
answer
479
views
Convert from an irregular cell sizes xyz file to raster. Missing Z value in the obtained raster
I have a xyz file that I want to convert to a raster using terra library. Although I have been able to convert to a raster the z values are missing.
The code is as following:
# Purpose: convert from ...
0
votes
1
answer
168
views
How to find how many times each pixel is covered in several GeoTIFFs?
I have a few GeoTIFFs which might have overlap, I want to find how many times each pixel is covered in several GeoTIFFs. I thought it is best to create a heat map in Python (using Gdal or Rasterio) ...
0
votes
1
answer
235
views
Issues with Rasterization
I have been working on a 3D software renderer in C recently, and I have managed to get some shapes and wireframes working.
However I have now gotten to rasterization and I can't seem to get it working....