# How to scale multiple objects with different phase of a sinusoidal wave?

Being a beginner in Blender, I'm stuck with a basic (maybe for experts) problem. Please help me out.

Suppose a bunch of uv spheres is placed at equal distance on a plane (or grid). The animation will be such that the plane will oscillate with a sine wave, and those spheres will also be scaled along the z direction according to the wavy nature of the oscillating plane. As the spheres are placed at different positions of the plane and so at different phase of the wave, the scaling will be according to the current phase of the wave.

• This is very much a Geometry Nodes thing. I notice you tagged your post “Blender internal render engine.” Are you actually using Blender 2.79, or Blender 3? Apr 8, 2022 at 4:09
• I am using Blender 2.92 Apr 8, 2022 at 5:08
• I would very much recommend upgrading from that, since blender 2.92 doesn’t have any features that Blender 3+ hasn’t AFAIK. Apr 8, 2022 at 14:52
• Hi, I edited your tags to be more relevant to your question. It's OK to add others in if you think they're relevant. Apr 8, 2022 at 15:28
• It's not a basic problem. I can think of a couple of ways to solve it and they both require advanced knowledge. You might construct the entire thing with geometry nodes, if you upgrade to 3.1 as @TheLabCat has suggested; or you might be able to do it with drivers. I'll see if I can work out a driver solution. Apr 8, 2022 at 15:32

# Control by driver

## Run the script and you can get entire scene

import bpy

# select and del all object
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action = "SELECT")
bpy.ops.object.delete(use_global=True, confirm=False)

# add 20 sphere and set driver
x = 0 # use for distance offset
for r in range(20):

oj = bpy.context.object

dr[2].driver.expression = f"sin({x}+frame*0.05)"


Let f(n) = An + B \\ \left\{\begin{align*} &f(1)=A+B=min\\ &f(-1) = -A+B=max\; \end{align*}\right.\\ f(n) = \frac{min-max}2n+\frac{min+max}2