hello
im wondering if there is a better way to approach what i am going for, which is to adjust the "tension" of dispersion of a set of values (please excuse the dodgy jargon)
rather than fail to explain it ive made an example project, if you turn on the preview and play with the Tension : DefineVariable, hopefully you will see what i mean - though not a good idea to slide it below 0
1 is linear. above 1 gradually becomes "steeper" but below 1 is kind of ugly, there is a huge gap formed between the first 2 points.
what im trying to figure out is how to make it essentially the "opposite" of above 1
the formula is in Content.o_sphere.OnUpdate.ZExpression , any advice is welcome
thanks
pond
maths question
Moderator: Moderators
maths question
- Attachments
-
- grapher.zgeproj
- (3.38 KiB) Downloaded 512 times

Not exactly sure what you're aiming for, but if you want the value above one to behave the opposite of what it does below one, you can do the following ..
Code: Select all
if(Tension < 1)X = pow(T,1/Tension); // Result = X,T
if(Tension > 1)Y = pow(T,1/(2-Tension)); // Result = T,Y
K
- Attachments
-
- Graph.zgeproj
- (862 Bytes) Downloaded 527 times
hi Kjell thanks for replying, sorry i didnt explain it too well, im not actually trying to make a graph, i just thought that graphing the formula (function?) would help, but it actually made it more confusing i think, hmm i hope i didnt waste much of your time
im actually using the function to manipulate the "Identity" variable across spawnmodel clones of a shape, to play with their basic attributes (scale,position,rotation etc) and how they interrelate to the attributes of their clone brothers and sisters
ive attached a much clearer (i hope) example, showing how im using it - on position.Z only.
if you get another chance, id be interested to hear from you again, i feel sure there is a more elegant way to do this
thanks
ps. ive been copying this formula in a zexpression over and over for each attribute i want to control, am i correct in thinking that if i learnt how to build a zlibrary i could store the formula there,then if i want to modify it i only need to change the "master copy"?
im actually using the function to manipulate the "Identity" variable across spawnmodel clones of a shape, to play with their basic attributes (scale,position,rotation etc) and how they interrelate to the attributes of their clone brothers and sisters
ive attached a much clearer (i hope) example, showing how im using it - on position.Z only.
if you get another chance, id be interested to hear from you again, i feel sure there is a more elegant way to do this
thanks
ps. ive been copying this formula in a zexpression over and over for each attribute i want to control, am i correct in thinking that if i learnt how to build a zlibrary i could store the formula there,then if i want to modify it i only need to change the "master copy"?
- Attachments
-
- identity manipulation.zgeproj
- (3.51 KiB) Downloaded 548 times
Hi pond,
Still quite confused ... often it is easier to help somebody asking "how do I make my character jump", rather then trying to assist someone with their ( attempt at a ) particular solution on a certain something. Anyway, I can answer your PS
K
Still quite confused ... often it is easier to help somebody asking "how do I make my character jump", rather then trying to assist someone with their ( attempt at a ) particular solution on a certain something. Anyway, I can answer your PS

Yes, you want to use a ZLibrary for that. Not much to learn though, the syntax is pretty easy / standard.I've been copying this formula in a zexpression over and over for each attribute i want to control, am i correct in thinking that if i learnt how to build a zlibrary i could store the formula there,then if i want to modify it i only need to change the "master copy"?
K