Skip to content

Instantly share code, notes, and snippets.

@CakirEfekan
Last active January 12, 2021 19:48
Show Gist options
  • Save CakirEfekan/6edf8e93d3647ba10760d57a5b131c2f to your computer and use it in GitHub Desktop.
Save CakirEfekan/6edf8e93d3647ba10760d57a5b131c2f to your computer and use it in GitHub Desktop.
#----
# You must change inputs and outputs of RhinoScript item like that: https://i.vgy.me/cJRKsV.png
#----
# You can find the Rhinoceros Color Based Shell Attractor video
# in YouTube with that link: https://youtu.be/8t3As2xJpX0
#----
__author__ = "efekan çakır"
__version__ = "2021.01.08"
import rhinoscriptsyntax as rs
#red, green and blue values is being assigned
red = rs.ColorRedValue(color)
green = rs.ColorGreenValue(color)
blue = rs.ColorBlueValue(color)
#attractor point created as rgb value that is fixed as 0,1 interval
attractorPoint = rs.PointCoordinates(rs.AddPoint((red/255, green/255, blue/255)))
#color is redirect directly
color = color
#hardness value softed with calculation
hardness = blue/25.5*2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment