Grasshopper

algorithmic modeling for Rhino

how does remap number work if i do not enter sourse domain

if i use sourse domain for" remap number",  i can understand the relationship between input and output.

but if i do not use sourse domain, i can not understand how it works.

seems the distance between numbers has been scaled to the distance of target input(1.1 to 2.1 is 1, 3.07 to 4.77 is 1.7 ) 

but how does the first output number 3.07 come from?

Views: 1003

Attachments:

Replies to This Discussion

There is a default of 0 to 1

 

Let Source Domain as S1 to S2 and Target Domain as T1 to T2..

 

If X is a value of input, the output value, Y, is..

 

( Y - T1 ) / ( T2 - T1 ) = ( X - S1 ) / ( S2 - S1 )

 

----

 

In your example..

 

T2 - T1 = 2.9 - 1.2 = 1.7

 

S2 - S1 = 1.0 - 0.0 = 1.0

 

(T2-T1)/(S2-S1) = 1.7 / 1.0 = 1.7 (called scale factor)

 

Y = 1.2 + 1.1 * 1.7 = 3.07  

 

good explanation!

Hi I am new to Grasshopper. I want to know why forcibly going for this linear equation " for remapping numbers. ( Y - T1 ) / ( T2 - T1 ) = ( X - S1 ) / ( S2 - S1 )". Does it means every one is using same equation. I think with certain combination of components, we can have our own equation. Do we really need such component. Might be I haven't explored its potential yet. Correct me if I am wrong.

I think with certain combination of components, we can have our own equation.

Why bother using a high level programming language... we should all just write in machine code.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service