[Plugin] Function Plotter
-
def f(x,y) (Math.sin(x*y)) end n= -30 m= 30 pts = [] for x in n..m for y in n..m x2 = x.to_f/10 y2 = y.to_f/10 z = f(x2,y2) pts.push([x2,y2,z]) end Sketchup.active_model.entities.add_curve(pts) pts.clear end #Sketchup.active_model.entities.add_curve(pts) #pts.each {|x| Sketchup.active_model.entities.add_cpoint(x)}quite optimistic to call it a plugin, but its good fun.
Just plug a function of x and y in to the top def, put your range in to n and m and run the whole lot through jims webconsole.
Makes lots of pretty patterns




-
Now just 'mesh' it

Very good...
See also 'K_tools.rb' for similar ideas...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement