# Can you randomize the triangles of an icosphere?

Im really struggeling with getting this triangular structure to work.

Its like half an icosphere but with randomised vertices.

I already tried editing the vertices with random-proportional editing and then do a limited dissolve. But this only works to a limit and gives something like this

If anyone knows a quicker solution than" do it by hand" id be so glad.

Edit: Haunt_Houses answer worked perfectly

• that upper image is really difficult to understand... blurred or out of focus, dark... ! Feb 13 '18 at 9:31
• You can also try using dyntopo sculpting for this if you want more control (you can paint triangle density)
– gandalf3
Feb 14 '18 at 2:52

I'm not at all sure whether it will achieve the desired result since for some reason the image above is so blurry that I can't really see what the goal is, but here's how you can randomize the sphere.

• Create an Icosphere and enter Edit Mode.
• Keep the 3D-cursor in the center and set the pivot point to 3D-cursor
• Use A to select nothing and then from the select menu choose Random Select.
• Hit RR to enable trackball rotation and slightly move the verts. Since it's rotating around the center, the mesh stays spherical.
• Repeat those steps (deselect, random select, trackball rotation) until everything is random enough.

• Subdivide it with W1. Set the fractal value in the Redo panel to about 3. This adds noise.
• Space "to sphere" 1Return. The 1 makes sure it's truly spherical again. You can skip that part but the risk of getting overlapping verts becomes higher.
• Repeat the previous two steps 2 or 3 times.

• One is glad to be of service. Feb 13 '18 at 10:42

An easy way to get random triangles on any geometry is to start from a highly subdivided object and apply a Decimate modifier.

You will get nice regular triangles with the Collapse option. Use the Ratio to tweak the number of final faces.

BMesh Version

Create an icosphere using bmesh. Each vertex is then randomly rotated some amount from 0 to a maximum angle about a random axis.

Result of running script, with from left to right, 3, 4 and 5 degree maximum angles.

import bpy
import bmesh
from mathutils import Matrix
from random import uniform

context = bpy.context
# icosphere parameters, edit to suit.
diameter = 1
subdivisions = 4
max_angle = radians(5) # 5 degrees
bm = bmesh.new()

bmesh.ops.create_icosphere(bm,
subdivisions=subdivisions,
diameter=diameter)

# randomize
for v in bm.verts:
axis = [uniform(-1, 1) for c in "xyz"]
rot = Matrix.Rotation(uniform(0, max_angle), 3, axis)
v.co = rot * v.co

me = bpy.data.meshes.new("RandomIco")
ob = bpy.data.objects.new("RandomIco", me)
bm.to_mesh(me)


Alternatively rather than create an icosphere, can use in edit mode on any mesh to randomly move the radial from origin to vertex, keeping the distance (radius) same.

Result of running a 1 degree random move about 10 times on selected vertices of half icosphere

import bpy
import bmesh
from mathutils import Matrix
from random import uniform

context = bpy.context
ob = context.edit_object
me = ob.data
# randomise parameters

max_angle = radians(1) # 5 degrees
bm = bmesh.from_edit_mesh(me)
# randomize
for v in bm.verts:
if not v.select:
continue
axis = [uniform(-1, 1) for c in "xyz"]
rot = Matrix.Rotation(uniform(0, max_angle), 3, axis)
v.co = rot * v.co

bmesh.update_edit_mesh(me)
me.update()
`