algorithmic modeling for Rhino
The intention of the research was to create the Mandelbrot Set by using custom ghPython component in Grasshopper.
Albums: Julia Set + Mandelbrot Set
@Kim. I think comparing a ghPython implementation for fractals with high level engines developed by computer scientists isn't really a fair comparison ;) Those are two different worlds
I think what you are doing is a great exerciser in understanding the math that produces the Mundelbrot Fractal implementation in ghPython. But it hardly matches even FractalInt I used 20 years ago. Or whats currently capable in the Fractal programming World.
Hey, since your work, Have you considered doing a generic component for these things? I guess we're talking about a Itereted function system (IFS).You can use the gh parser and use a function as a parameter.
A quick example in VB:
Private Sub RunScript(ByVal Exp As String, ByVal iter As Integer, ByVal t0 As Double, ByRef A As Object) Try Dim pts As New list(Of point3d) Dim Pt As New point3d(1, 1, 0)
Exp = Exp.Replace(" ", "") Dim func As String() = Exp.Split(",")
Dim parser As New grasshopper.Kernel.Expressions.GH_ExpressionParser()
Dim i As New Integer Do While i < iter parser.ClearVariables() If Exp.contains("x") Then parser.AddVariable("x", Pt.X) If Exp.contains("y") Then parser.AddVariable("y", Pt.Y) If Exp.contains("z") Then parser.AddVariable("z", Pt.Z) If Exp.contains("i") Then parser.AddVariable("i", i) If Exp.contains("iter") Then parser.AddVariable("iter", iter) If Exp.contains("t0") Then parser.AddVariable("t0", t0) Pt.X = parser.Evaluate(func(0))._Double Pt.Y = parser.Evaluate(func(1))._Double Pt.Z = parser.Evaluate(func(2))._Double pts.add(pt) i += 1 Loop A = pts
Catch ex As exception Print(ex.ToString) End Try End Sub
Sign Upor Sign In
by Parametric House
by Shihab Naeem
Added by Parametric House
Added by Axocraft
Added by June Lee
© 2021 Created by Scott Davidson.
Report an Issue |
Terms of Service
Please check your browser settings or contact your system administrator.