can Houdini take input from a ramp and store it into an array so it can be used in a formula? for instance I want to use a ramp to set multiple coordinates for latitude/longitude, then store them into an array for use in a formula? or instead of a ramp what input method would you recommend for input of lat/long data? also, if it can be done is information in array volatile or will it stay in array when I save program?
edit: for instance lat/long of Los Angeles, Dallas, Miami, Chicago etc ..
can Houdini store info in array with input from ramp
1205 4 2- bobc4d
- Member
- 320 posts
- Joined: May 2016
- Offline
- shareware
- Member
- 40 posts
- Joined: March 2018
- Offline
To take values from a ramp at regular intervals you can write a loop in a detail wrangle like this:
Maybe you can adapt that idea? But really you might be better off just adding some float boxes to a wrangle, reading the values and pushing them to your array.
float output_arr[];
for(int i = 0; i<10;i++){
float in = i/10.;
float out = chramp("myramp", in);
push(output_arr,out);
}
setdetailattrib(0,"array",output_arr);
Maybe you can adapt that idea? But really you might be better off just adding some float boxes to a wrangle, reading the values and pushing them to your array.
Edited by shareware - March 19, 2021 12:09:14
- bobc4d
- Member
- 320 posts
- Joined: May 2016
- Offline
- tamte
- Member
- 8602 posts
- Joined: July 2007
- Offline
- bobc4d
- Member
- 320 posts
- Joined: May 2016
- Offline
-
- Quick Links