Forum: Poser - OFFICIAL


Subject: Matmatic - Displacement Problem

ropeypopey opened this issue on Aug 31, 2006 · 36 posts


ropeypopey posted Fri, 01 September 2006 at 7:45 PM

As promised.....

Function to make a displacement thread

def MakeThread(Turns, Threads):
    Throw = 1.0 / Turns
    Diam = Abs(Throw / Threads)
    k = (V + Throw * U) % Diam
    k = Max(k, 0)                        # avoid negative numbers ;-)
    DispThread = Sqrt(k * (Diam - k))
    return DispThread
   

Main Script

s = Surface(IColor(210,210,150),1,ORANGE, 5, 0.05)

Make 3 different threads

Disp = 0
Disp += MakeThread (6,2)
Disp += MakeThread (-4,10)
Disp += MakeThread (2,100)

s.Displacement = 10 * Disp

With a wee bit of work getting the seams and UV's lined up this could be quite useful.

My favourite question is "Why?", my second favourite is "Why not?"