algorithmic modeling for Rhino
Playing off of Danny's computer language conversion theme, make a definition that converts any integer up to 65535 (one less than 16^4) to its 4-digit hex equivalent.
Examples:
0 = 0000
1 = 0001
9 = 0009
10 = 000A
16 = 000F
65535 = FFFF
Scripting will obviously be the shortest. I think finding the shortest native def. is more interesting. Mine's 13 components including a slider for input, a panel for output, and a couple other panels to hold pertinent info (I just mean there is data that could be internalized to shave off a couple components, but there is no internalized data in mine).
Best,
Brian
Tags:
ok, just for fun, attached definition which can handle any number of digits, not just 4
and actually any base(radix) up to 16
EDIT: I just opened this file, very nice. I like how you defined the function to be evaluated. And obviously at this point you win :)
Nice. Your first one looks like it's pretty much the same as mine, except at each step I just divided by 16 and used the results as indices for retrieving equivalent values from a param component.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by