I want to create mountain logos similar to this one:

enter image description here

I started accumalating random integer sequences looking for a solution with the Filling-option of ListLinePlot. But this went utterly wrong. Maybe, a better way would be to use Graphics with some Polygons arranged in a proper way?

Solutions starting with an Image and using the Image-processing capabilities of Mathematica are also possible. Take f.e this one:

enter image description here

The solution should be simple enough to to serve as a logo (not too many peaks and spikes) and should also provide some random variations, a user could choose from.

  • $\begingroup$ Search MorphologicalBinarize, Binarize, and ImageConvolve. $\endgroup$ Commented Aug 18, 2023 at 16:32

3 Answers 3


Here is an attempt with triangles.

numberOfPeaks = 4;

randomlogos = 
  Table[coords = 
    Table[RandomReal[] {{0 + RandomReal[], 0}, {1 + RandomReal[], 
        1}, {2 + RandomReal[], 0}}, numberOfPeaks];
   coords2 = Table[
     newymax = c[[2, 2]] - RandomReal[{c[[2, 2]]/3, 0}];
     newxmin = (newymax - 
          c[[2, 2]]) ((c[[2, 1]] - c[[1, 1]])/(c[[2, 2]] - 
            c[[1, 2]])) + c[[2, 1]];
     newxmax = (newymax - 
          c[[2, 2]]) ((c[[2, 1]] - c[[3, 1]])/(c[[2, 2]] - 
            c[[3, 2]])) + c[[2, 1]];
     {c[[1]], {RandomReal[{newxmin, newxmax}], 
       RandomReal[{c[[2, 2]]/2, newymax}]}, c[[3]]}, {c, coords}];
   Graphics[{Triangle[coords], White, Triangle[coords2]}]
   , 10];


enter image description here


I found a way to do this with Adobe Firefly. I think this might get downvoted because it's not using Mathematica. However, maybe you could use ImageSynthesize to do this. Anyways, here's a result. There is a feature request ImageSynthesize and Adobe Firefly if you have access you can visit.

enter image description here

Here's another one with material that I removed but for some reason the material didn't stay removed so I guess you'll have to manually remove it.

enter image description here

The prompt was

a mountain logo with black and white and sharp peaks in vector form with peaks and spikes


A partial answer

enter image description here

id = ImageData[image];

Review each of the color channels

Image[id[[All, All, 3]]] // Binarize

enter image description here

Start playing with Erosion and Dilation

Review of ImageHistogram[image] may be helpful for filtering the selected channel prior to Binarize to, for example, remove the blue sky by changing the "high" blue values to zero.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.