Skip to main content
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,686
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,880
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,457
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,457
2 votes

What graphic languages are simpler than SVG for database diagrams?

Graphviz is a popular tool for making network diagrams. It takes a text format ("DOT language") describing the nodes and edges as input, and can render the resulting diagram to SVG or other image ...
Nathan Reed's user avatar
  • 25.3k
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,880
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,441
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,441
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,336
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,366
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

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,880
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,366
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,484
1 vote

Matrix form of an open uniform cubic b-spline

If you want to determine those matrices you have to use the knot vector $[0, 0, 0, 0, 4, 5, 6,...]$ and write out the expressions using the Cox-DeBoor algorithm. I believe you will need to compute the ...
Reynolds's user avatar
  • 1,337
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 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,441
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,615
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,441
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
  • 25.3k
1 vote

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

I decided to solve the LED-rope problem using Inkscape as: enter the wanted text into the Inkscape set the color of the text to yellow add new layer above the text and lock the text layer in the new ...
clt60's user avatar
  • 141
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,457
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,457

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