Random Number Slider

Hello

how can create a random number slider?

You can use Random to achieve it, and fyi.

Random Grasshopper Online Document

i know it

but i, need random slider exactly i want this slider by random numbers.

Difficult to understand what you want.

not sure what you need exactly, but this is what I understood

build a list of random numbers and pick one with a slider (from 0.000 to 1.000)

Please look at the changes in this slider; it is completely organized.
What I need is a slider that generates random numbers when it is moved, and this randomness must be produced directly by the slider itself.

Is it possible to generate random numbers by sliding it?

And the output must come directly from the slider.

no, and I don’t understand why this is so important

randomness doesn’t exist and you can’t define it with just one slider

you can maybe use Random component and plug the slider into SEED, but you still need to define the range (for number input set 1)

Not on my PC but if you can put an equation inside slider and if rand is there you can use it. Default rand use time so it is random

As @laurent_delrieu pointed, you could create a simple pseudo-random algorithm with the aid of the available functions, and use that inside the slider’s Expression editor.

Pseudo-random slider.gh (4.1 KB)

Why?

I’m sure it’s possible, but would likely require tracking mouse button states/events etc. (i.e. quite complicated). A simpler solution could be to randomise the slider value on a button click (i.e. similar to how the genepool has a randomise function). Something like this, maybe:


251219_RandomiseSlider_00.gh (4.9 KB)

Just remembered this low level Windows hack. Again, not sure if this makes any sense to your problem, but it certainly seems to work (i.e. it generates/sets a random value when manipulating the slider gripper):


251219_RandomiseSlider_01.gh (4.8 KB)