Archive for 30/07/09

090730 -SHOW ME THE CODE!!!! (RVB) – attractor function

julio 30, 2009

4

OK, lets show the code!!!..

Function esfera (attr,k,mval,pa,pb,pc,pd,scale,i)

	Dim face
	Dim center
	Dim dist
	Dim esf
	Dim color
	face= rhino.addsrfpt (array(pa,pb,pc,pd))
	center= rhino.SurfaceAreaCentroid(face)

	ReDim dist (ubound(attr))
	Dim ptatr():ReDim ptatr (ubound(attr))

	For k=0 To ubound(attr)
		ptatr(k)= rhino.pointcoordinates(attr(k))
		dist(k)=rhino.Distance(ptatr(k),center(0))
	Next

	mval= rhino.min (dist)
	rhino.Print mval
	esf= rhino.AddSphere (center(0),(mval/scale))
	rhino.ObjectColor esf,rgb(255,i+(mval*5),133)
	rhino.ObjectColor face,rgb(255,i+(mval*5),133)

End Function
According to the recently attactor “fashion/porn” in the digital age (mainly grasshopper), i´m showing one of my first scripts in rhinoscript (2006). it’s an attractor function. Use, do wathever the f#$K!! you want with this function.
this was the core of my MAB-FPS code (https://escripto.wordpress.com/2008/07/01/080630_mab-fps-multi-attractor-based-flat-panel-skin/), a nice script for my thesis. Lee el resto de esta entrada »
Anuncios