# Planetside Software Forums

## Function Nodes In Practice => Function Node General Discussion => Topic started by: WAS on April 22, 2021, 03:48:28 PM

Title: How to Scale and Rotate with Functions?
Post by: WAS on April 22, 2021, 03:48:28 PM
Howdy doody! I have a question for the math wizards of the Terragen community!

I know how to translate with functions (constant displacement warping on Z, Y, or Z), but how can I scale something with a scalar based function? And how can I rotate with scalar based functions?

Scalar based as in can define the scale/rotation with scalars.

I really do hope Matt can add a updates Transform Input/Merge shader that can accept a vector for translate, rotate, and scale. This would be so amazing. Would be super easy to add a Constant Vector with any settings you want, and also dissect the vector to modulate it any way you need.
Title: Re: How to Scale and Rotate with Functions?
Post by: WAS on April 26, 2021, 03:20:54 AM
So I found this wiki which seems to have what i need for scaling but unsure how to translate it.

https://en.m.wikipedia.org/wiki/Scaling_(geometry)
Title: Re: How to Scale and Rotate with Functions?
Post by: aknight0 on August 07, 2021, 09:07:52 PM
Late response, but are you looking for a rotation matrix?

https://en.wikipedia.org/wiki/Rotation_matrix
Title: Re: How to Scale and Rotate with Functions?
Post by: WAS on August 07, 2021, 10:50:08 PM
Yeah that looks to be. I just not sure how to translate these to functions, or if there is missing logic making it not possible.
Title: Re: How to Scale and Rotate with Functions?
Post by: Toggle on November 08, 2021, 10:59:00 AM
I'm interested in it