F
F
flm2010-12-15 13:57:00
Adobe
flm, 2010-12-15 13:57:00

Building a "complex" color gradient?

I was rummaging through my university materials and found one of my old articles. Initially, the task was to build a 3D relief model, having a relief map (Ukraine) in isolines. It was transformed into the construction of a grid function F(xi, yj) on a grid N*M, where (xi, yj) are the grid nodes, and the value of the function is the height of the relief at the node.
There were two problems:
The first one was that the terrain built by triangulating this grid had to be smooth(!).
The second is that the grid can be very fine, i.e. there can be a lot of points. So the algorithm must be "fast".
We then solved this problem and even wrote a short article in the University Bulletin. At the same time, it was clear that in a similar way it is possible to solve the problem of constructing a smooth color gradient on a complex area (with many "constant" spots and "pockets" of complex shape).
53704e1dc2.jpg
And now the question (it just became interesting): is such a task implemented in modern graphics packages (in photoshop, in my opinion, only a gradient by pattern)? Is there something similar in the canvas libraries?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
MikhailEdoshin, 2010-12-15
@MikhailEdoshin

In illustrator, you can make blends between two curves (i.e., translate one into the other in a given number of steps), but it only copes well with simple cases, best of all - when the curves have the same number of points; in difficult cases, the quality is unacceptable. In addition, there are such meshes, but I find it difficult to describe in words how they work :) Not like yours, definitely. And yes, it's all vector. As for Photoshop or other raster editors, I have not heard this, however, I have not worked in this area for a long time.
The thing is useful, especially for cards. Once I drew a bump map for a contour map by hand; pretty boring job. But even without maps, soft gradients between arbitrary spots, in my opinion, are a very valuable thing; think of a patent.
Is there an example of how the algorithm works? Here at least on your own example.

L
lsdima, 2010-12-15
@lsdima

If you have a polygonal mesh, use polygonal shading. If you need color coding, use hue shift instead of brightness shift. Gouraud shading will be fast and smooth even on a small amount of polygons.
Look also at the wonderful blog of the American cartographer, just related to visualization: indiemaps.com/

L
lashtal, 2010-12-15
@lashtal

I think this is a standard feature of many 3d/cad/… packages, Autodesk in particular has a lot of products that can do this. Here is another page where there is a lot of software for converting ECD / point clouds to a grid: www.vterrain.org/Elevation/contour.html
photoshop, chandelier and other 2d editors can’t do that, it generally only makes sense in 3d ... I.e. I can theoretically imagine the need for such gradients in 2d, but in these rare cases it's easier to take a screenshot of the top view in a 3d program =)

S
Sannis, 2010-12-16
@Sannis

Can I ask for a link to articles? :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question