5 votes
Accepted

What are the i,j,k components of a 3d mesh on plot.ly (online)?

Most mesh drawing tools use triangles to draw meshes, for technical reasons. You could simply specify the coordinates of the three vertices of each triangle, but that is a bit wasteful in terms of ...
Paul92's user avatar
  • 216
4 votes
Accepted

Bezier Curve Tool Controlled by Mouse

Instead of using cubic Bezier spline, you should use cubic Hermite spline. For cubic Hermite curve you specify the segment end points and tangents, which is what you then control in the tool. Hermite ...
JarkkoL's user avatar
  • 3,636
3 votes
Accepted

Thick Line segment

The main part of it is simply Pythagoras's Theorem. The square root gives the length of the central line segment (which is the hypotenuse of a triangle formed by the change in x and change in y). The ...
Dan Hulme's user avatar
  • 6,810
3 votes
Accepted

adobe illustrator art brush, how does it work?

These rely on a transformation from global coordinates to path local coordinates, where the local axes are along and out (or more often u and v). In essence this all works on a principle similar to ...
joojaa's user avatar
  • 8,437
3 votes

inside and outside region identification from 2D contour

In general, I recommend the book Real-Time Collision Detection. For your particular case, my first choice would be to use the 3D test for point-inside-mesh. I assume that the contour is a sequence of ...
IneQuation's user avatar
3 votes
Accepted

SVG opengl implementation - strokes overlap on transparency

You can use the depth buffer to ensure that the second time you get on a point the pixels aren't written. You start with the maximum depth value and each new path (that you want to add to the ...
ratchet freak's user avatar
2 votes
Accepted

Choosing & Using a Projection Matrix

The values will only form a cube after performing the perspective divide, which I don't see happening in your code. That is, you take a vector $[x, y, z, 1]$ and transform it by the projection matrix,...
Nathan Reed's user avatar
2 votes
Accepted

First steps towards CAD standard curve fitting

Since you have a limited set of tools you are not actually doing a classical fitting. What you have is a discrete problem. And since you are looking for a somewhat easily drawn fit, no more than twice ...
joojaa's user avatar
  • 8,437
2 votes
Accepted

Determining the 'outer' subpath in a compound SVG path

If you can assume the subpaths are non-intersecting (and non-self-intersecting), and that the fill rule is always the nonzero rule, the easiest way is probably to pick the first point on the first ...
Dan Hulme's user avatar
  • 6,810
2 votes

Vectorizing to polylines instead of paths

If you look at chapter 8 of the SVG Specification, it describes how to parse a path element. The short version is that you'll want to find the ...
user1118321's user avatar
  • 3,411
2 votes

How to get the length of paths in an given font/character

The way I would approach this is to get the outline curves of the font and then break each one down into some fixed number of steps (like, say, 100), and make a series of very small straight lines. ...
user1118321's user avatar
  • 3,411
2 votes
Accepted

Why inverse of an allignment matrix is the same as its transpose?

To align vectors, you are applying a rotation. If you consider a simple rotation matrix, e.g. rotation of angle $\theta$ around Z axis, then you will trivially see that its inverse matrix, a rotation ...
Simon F's user avatar
  • 4,241
2 votes

Bresenham's Algorithm not drawing horizontal lines

e = (float)(delta_x / delta_y) - 1.0; e += (float)delta_x / delta_y; Either of these lines will cause a divide-by-zero error when ...
Dan Hulme's user avatar
  • 6,810
2 votes
Accepted

Is a line drawn using vectors, triangles or polygons within OpenGL?

The general principle of OpenGL is using the GPU and a so called rendering pipeline where you can program parts of it on your own, called "shader". The input model you want to draw (render) ...
Thomas's user avatar
  • 1,265
2 votes

How to remove elements in PDF/EPS vector graphics which are completely hidden?

This answer intends to flesh out joojaa's comment to a more complete answer. It's possible. But probably not easy. If you work with the EPS file, it's very likely to be ASCII or mostly ASCII so you ...
luser droog's user avatar
  • 1,378
2 votes

Relative coordinates -- cumulative sum

I am rewriting this answer because of misunderstandings and a better explanation of the algorithm. The render pipeline is not well suited for this kind of task. It is better to use compute shaders ...
Thomas's user avatar
  • 1,265
2 votes
Accepted

How do I normalize all pixel values such that all pixel values are 'pulled towards' the mean?

Here are both images "cleaned" using simple luminance thresholding like I suggested in the comments. There was nothing special done to these images, a simple "is the luminance below ...
pmw1234's user avatar
  • 3,219
1 vote

How do you add text dynamically to an image and export it?

To do this in a web app is trivial. Judging by the image, even the built-in HTML canvas should be able to do everything that you need. Once you have obtained your image and text, to give you a vague ...
arctiq's user avatar
  • 31
1 vote

Program to make "Pieslice" without using library function?

You can use the sine and cosine functions to do this. Normally they start on the x axis and rotate counter-clockwise. The start point can be found by calculating: ...
user1118321's user avatar
  • 3,411
1 vote

Any good sources on advaced/special rasterization algorithms and techniques and theory behind them?

Quake subdivision rasterization comes to mind. https://www.bluesnews.com/abrash/chap69.shtml , under ”An idea that did work”.
hotmultimedia's user avatar
1 vote

Any good sources on advaced/special rasterization algorithms and techniques and theory behind them?

One rasterization method I like is Haar wavelet rasterization: http://faculty.cs.tamu.edu/schaefer/research/wavelet_rasterization.pdf It can render polygons and Bezier curve shape and good for ...
Châu's user avatar
  • 21
1 vote
Accepted

LoopBlinn Cubic Curve Rendering - Serpentine arteffect

found the problem, it was the shader. I am using following shader, that works fine ...
codeKhor's user avatar
1 vote

Confused about graphic art and what software is used to create the environment of it?

This would be considered isometric. Isometric graphics were originally used to give a 3D look, when computers could not handle actual 3D graphics. The creation of this image, however, is different ...
bram0101's user avatar
  • 1,605
1 vote
Accepted

How to make a translation relative to the line ax + by + c = 0, affine transformations

If I understand correctly, you want to draw 2 objects mirrored with respect to an arbitrary line. Then when you move 1 object you want the other (reflection) to move with respect to that reflected ...
gallickgunner's user avatar
1 vote

How to make a translation relative to the line ax + by + c = 0, affine transformations

To mirror an object in relation to an arbitrary line, you first have to find the coordinates of that object in the frame of reference of that line. For convenience, we will define a frame of reference ...
Antony Riakiotakis's user avatar
1 vote

how to build the feature curves of this algorithm?

The way I read it, you have a 2D cubic Bézier that defines the projections of the ridge line (or river bed, or whatever) onto the X/Y plane. In Figure 4, these are the dark purple lines. So that ...
user1118321's user avatar
  • 3,411
1 vote
Accepted

Determining Vanishing Points of edges of Triangle using given Point

Vanishing points are "points at infinity" in projective geometry, which are represented by $w = 0$ in homogeneous coordinates. You can construct the vanishing point of a ray or line by taking its $xyz$...
Nathan Reed's user avatar
1 vote
Accepted

Hooke's Law vector form

If we sidestep your typo (the last term has one absolute too much), both formulations are correct. They just express different things. The $k$ in Hooke's law is for a particular spring. $k_s$ is the ...
joojaa's user avatar
  • 8,437
1 vote

Fill an irregular region with 2D shapes

There is no general algorithm for packing problems. Only some of the special cases have known, and optimal, solutions. If you are packing one shape then finding a reasonable solution is possible. Like ...
joojaa's user avatar
  • 8,437

Only top scored, non community-wiki answers of a minimum length are eligible