# visualization

i would like build cogwheel mechanism with dynamically changing the number of teeth
Something like this

Where shoud i start?

thank you

Take a look at that attached file:

I didn’t follow any official formulas of which there are many online - if you can break the code down into CHOP-speak you could go that route although you could also write out a bunch of values to a table from a python script and then turn that into a chop which might be more copy paste friendly.

Anyways! the attached file is a rough approximation, more of a proof of concept. But it should be more than enough to get ya started
gearDesigner.toe (7.28 KB)

sure thing!

Here’s another method which is super simple but would allow for use of imported geo for your “cog teeth”. You could duplicate this network, swapping out the “tooth” sop for different-looking teeth to recreate the complexity in your reference photo
instanceGears.toe (5.88 KB)

Jacob, that’s a really good idea too, much more artist/design friendly too. I think figuring out what the math relationship between number of cogs and diameter of wheel would make that a pretty prime solution !

Thank you, Jacob!
Very simple and usefull.

No problem, Ujif!

Lucas - yeah I was thinking about that - would be awesome, especially since it would allow you to match 2 cogs so they fit each other correctly.

One thing I initially wanted to do is use geo instancing instead of copy sop, but couldn’t figure out the best way to align the teeth to the point normals like the copy sop does automatically. I think this would be the best way to do this especially if you wanted to go crazy with the amount of cogs

true, although if your teeth are always going around a perfect circle, you could specify evenly spaced rotation coordinates into the instancer as well.

for example,if there was 36 teeth, then each tooth would have +10 rotation than the last, etc

another moment

i rotate the gear. From 0 to 60Hz it`s ok, but from 60Hz to 100 visual of rotating is stuck (i think its because of camera effect 60 Fps) After 80 Hz everything goes well

Could you tell me please if there is a solution to this problem?

Not sure I understand, Could you attach an example?

I`ve solved this problem)) its simple . I use MAX/MSP (which is still much more comfortable for me as i am absolute beginner in TD)
So i send data from MAX to control speed of cogwheel and I ran into some problems related to the visualization of the rotation of the gear at different speeds, but it is not so important.
Much more interesting is what you said - Using instances. I have been studying this problem and still can not find the solution how to orient the teeth according to the normals. And I thought, can I use instances to make shaft with lots of gear? Again I am an absolute beginner in TD)

Here is what i have for now (I collect everything I find on this subject in one patch)
instanceGears2.1.toe (9.46 KB)

hi,
here is just some instancing for you. As someone else mentioned, maybe it would be wise to instance the teeth not the whole wheel, but as you said you are a beginner, i thought this might help,
cheers!
instanceGears2.4.toe (10.7 KB)

about instancing and rotating to normals, here you go

Great Thnx!
I`ve just missed to point Attribute Scope N for using normals

The model is looking quite fine. I think it will work better.

Oh awesome thanks for explaining how to do that, hrtlacek! Lot’s of awesome tips in these networks!

I’m trying to go a step further now and try nesting the instanced teeth geo within another instanced Geo but it doesn’t work? wound up using copy sop again to get around it for now.

Ujif, I took my controls from another one of my projects which control instances along a spline. You can edit this spline as an animation curve, or you can just replace it with a tube sop for your shaft. But I would love to know why nested instancing not working?
gears_withInstanceControls.toe (14.7 KB)

There is no solution, but there is also no real problem. Rotating at 60 Hz is very fast. Also, presumably, your monitor has a rate of 60 Hz, so it makes sense that it seems stuck. Read up upon aliasing(en.wikipedia.org/wiki/Aliasing) if you want to know more. In theory, you should be able to draw up to 30Hz (half sampling rate of your monitor) correctly. Which still is very fast. Going beyond that should produce other frequencies between 0 and 30Hz, (fold-back)
cheers!

JacobM, now i am also stuck with this problem. why nested instancing not working

also i tryed to do like this and i`ve got nothing

hrtlacek<
thnx. I`ve got a solution how to style fast rotation. With Jitter i use Gl feedback shader it geves smth like the blur effect
object_merge_issue.tox (574 Bytes)