Forgot password?

Create an account!

Forum

« back

RhinoScript – random between two numbers

Messages

Please log in to write a message.

  • 2. Johannes (May 10, 2011 11.37):

    hi,

    Randomize

    intNumber = 20 + (10 * rnd)


    johannes

  • 1. mmakki (May 10, 2011 11.26):

    Hello, i know this should be simple.. but i cant figure it out! i remember being taught how to do this, and i completely forgot! If i wanted to extrude curves with random heights, however i want the heights to be randomly chosen between 20 and 30?

    for the sake of this example, heres a script:

    Dim curves,i

    Curves = rhino.getobjects ("sel curves")

    For i = 0 To ubound(curves)

    rhino.ExtrudeCurveStraight curves(i),array(0,0,0),array(0,0,rnd)

    Next

    so how do i set this up to extrude randomly between two numbers i want?

    thanx again, and excuse such a beginner question !

Recommend

Why are these buttons gray?