Brain twister (Bubble Bias)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2012   #1
Brain twister (Bubble Bias)

Here is a new one I've been messing around with today in my freetime. It's an attempt at a bubble bias. Where both ends are condensed and the middle is stretched thin. In the example I used boxes and adjust there placement on the z axis. Check it out. I do believe there is a more efficient way of doing this. I'm still in the process of messing with it but feel free to chyme in and mess with it. I'm hoping to implement a way where the bias control for both ends could be independent from one another.

Code:
totalHeight = (units.decodevalue "100cm") count = 21.0 sz = (units.decodevalue "3cm") clearlistener() endBias = .4 --range -1.0 1.0 biasStrength = 1.0 --range 1.0 100.0 fn fnCreateBoxes = ( fn biasCalc f bias:0.0 power:1 = ( if bias < 0 then 1 - (pow (1 - f) (1 - power*bias)) else (pow f (1 + power*bias)) ) for k = 0.0 to count-1 do ( middle = (count-1)/2 bubble = if k == middle then 0.0 else if k > middle then (endBias*-1) else (endBias) format "% - %\n" k bubble f = k/(count-1) h = biasCalc f bias:bubble power:biasStrength obj = box width:sz height:sz length:sz pos:[0,0,(totalHeight*h)] print obj.pos.z ) ) delete objects fnCreateBoxes()
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 10 October 2012   #2
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:37 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.