Last active
May 29, 2017 16:27
-
-
Save eliheuer/58f2b2e8239855f701ba37bb497d3da0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import random | |
import math | |
scene = bpy.context.scene | |
# add metaball object | |
mball = bpy.data.metaballs.new("MetaBall") | |
obj = bpy.data.objects.new("MetaBallObject", mball) | |
step = 0 | |
scene.objects.link(obj) | |
mball.resolution = 0.2 # View resolution | |
mball.render_resolution = 0.02 | |
for i in range(60): | |
coordinate = (math.cos(step*124), | |
math.sin(step*step), | |
step) | |
step += 1 | |
element = mball.elements.new() | |
element.co = coordinate | |
element.radius = 2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment