### Creating beam deflection?

M
mikeonenine@web.de
Wed, Nov 1, 2023 11:02 PM

Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns?

Example:

``````\$vpt=[ 20, 20, -80 ];
``````
``````\$vpr=[ 170, 45, 180 ];
``````
``````\$vpd=2000;
``````
``````\$vpf=15;
``````
``````H=2.5; // Beam slice thickness
``````
``````for(z=[-180 : 1 : 180])
``````
``````translate([0, 20*sin(\$t*360)*sin(z), H*z])
``````
``````cube([50, 25, H], center=true);
``````

I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble.

Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns? Example: ``` \$vpt=[ 20, 20, -80 ]; ``` ``` \$vpr=[ 170, 45, 180 ]; ``` ``` \$vpd=2000; ``` ``` \$vpf=15; ``` ``` H=2.5; // Beam slice thickness ``` ``` for(z=[-180 : 1 : 180]) ``` ``` translate([0, 20*sin(\$t*360)*sin(z), H*z]) ``` ``` cube([50, 25, H], center=true); ``` I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble.
RD
Revar Desmera
Wed, Nov 1, 2023 11:14 PM

Something like:

\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
sweep(
rect([50,25]),
[for (z=[-180:1:180])
up(Hz) * back(20sin(\$t*360)*sin(z))]
);

-Revar

On Nov 1, 2023, at 4:02 PM, mikeonenine@web.de wrote:

Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns?

Example:

\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
for(z=[-180 : 1 : 180])
translate([0, 20sin(\$t360)sin(z), Hz])
cube([50, 25, H], center=true);
I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble.

To unsubscribe send an email to discuss-leave@lists.openscad.org

Something like: \$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15; H=2.5; // Beam slice thickness sweep( rect([50,25]), [for (z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); -Revar > On Nov 1, 2023, at 4:02 PM, mikeonenine@web.de wrote: > > Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns? > > Example: > > \$vpt=[ 20, 20, -80 ]; > \$vpr=[ 170, 45, 180 ]; > \$vpd=2000; > \$vpf=15; > H=2.5; // Beam slice thickness > for(z=[-180 : 1 : 180]) > translate([0, 20*sin(\$t*360)*sin(z), H*z]) > cube([50, 25, H], center=true); > I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
RD
Revar Desmera
Wed, Nov 1, 2023 11:14 PM

Err, using BOSL2, of course.

-Revar

On Nov 1, 2023, at 4:14 PM, Revar Desmera revarbat@gmail.com wrote:

Something like:

\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
sweep(
rect([50,25]),
[for (z=[-180:1:180])
up(Hz) * back(20sin(\$t*360)*sin(z))]
);

-Revar

On Nov 1, 2023, at 4:02 PM, mikeonenine@web.de wrote:

Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns?

Example:

\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
for(z=[-180 : 1 : 180])
translate([0, 20sin(\$t360)sin(z), Hz])
cube([50, 25, H], center=true);
I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble.

To unsubscribe send an email to discuss-leave@lists.openscad.org

Err, using BOSL2, of course. -Revar > On Nov 1, 2023, at 4:14 PM, Revar Desmera <revarbat@gmail.com> wrote: > > Something like: > > \$vpt=[ 20, 20, -80 ]; > \$vpr=[ 170, 45, 180 ]; > \$vpd=2000; > \$vpf=15; > H=2.5; // Beam slice thickness > sweep( > rect([50,25]), > [for (z=[-180:1:180]) > up(H*z) * back(20*sin(\$t*360)*sin(z))] > ); > > -Revar > > >> On Nov 1, 2023, at 4:02 PM, mikeonenine@web.de wrote: >> >> Can sweep or turtle or something be used to get an animated bendy beam without the interference patterns? >> >> Example: >> >> \$vpt=[ 20, 20, -80 ]; >> \$vpr=[ 170, 45, 180 ]; >> \$vpd=2000; >> \$vpf=15; >> H=2.5; // Beam slice thickness >> for(z=[-180 : 1 : 180]) >> translate([0, 20*sin(\$t*360)*sin(z), H*z]) >> cube([50, 25, H], center=true); >> I’m sure someone out there can do in 5 minutes what would take me hours of toil and trouble. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >
M
mikeonenine@web.de
Wed, Nov 1, 2023 11:41 PM

Revar Desmera wrote:

Err, using BOSL2, of course.

-Revar

Hmmm. Doesn’t work with me, even after changing Hz to H*z in the last line. Does “sweep“ still need H*z or how is the length specified?

``````include <BOSL2/std.scad>
``````
``````\$vpt=[ 20, 20, -80 ];
``````
``````\$vpr=[ 170, 45, 180 ];
``````
``````\$vpd=2000;
``````
``````\$vpf=15;
``````
``````H=2.5; // Beam slice thickness
``````
``````sweep(
``````
``````rect([50,25]),
``````
``````[for (z=[-180:1:180])
``````
``````up(H*z) * back(20sin(\$t*360)*sin(z))]);
``````

Revar Desmera wrote: > Err, using BOSL2, of course. > > \-Revar Hmmm. Doesn’t work with me, even after changing Hz to H\*z in the last line. Does “sweep“ still need H\*z or how is the length specified? ``` include <BOSL2/std.scad> ``` ``` \$vpt=[ 20, 20, -80 ]; ``` ``` \$vpr=[ 170, 45, 180 ]; ``` ``` \$vpd=2000; ``` ``` \$vpf=15; ``` ``` H=2.5; // Beam slice thickness ``` ``` sweep( ``` ``` rect([50,25]), ``` ``` [for (z=[-180:1:180]) ``` ``` up(H*z) * back(20sin(\$t*360)*sin(z))]); ``` I’m with OpenSCAD Version: 2021.01
M
mikeonenine@web.de
Wed, Nov 1, 2023 11:49 PM

Revar Desmera wrote:

Err, using BOSL2, of course.

-Revar

Hmmm. Doesn’t work with me, even after changing Hz to H*z in the last line.

20sin needs to be 20*sin of course!

Now it works, thanks!

A bit slower than the original, though. Perhaps it would help if BOSL2 was incorporated in OpenSCAD instead of having to be called up.

mikeonenine@web.de wrote: > Revar Desmera wrote: > > > Err, using BOSL2, of course. > > > > \-Revar > > Hmmm. Doesn’t work with me, even after changing Hz to H\*z in the last line. 20sin needs to be 20\*sin of course! Now it works, thanks! A bit slower than the original, though. Perhaps it would help if BOSL2 was incorporated in OpenSCAD instead of having to be called up.
RD
Revar Desmera
Wed, Nov 1, 2023 11:55 PM

My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you.
Hopefully this version takes care of that:

``````\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
sweep(
rect([50,25]),
[for (z=[-180:1:180])
up(H*z) * back(20*sin(\$t*360)*sin(z))]
);
```

- Revar

``````

On Nov 1, 2023, at 4:49 PM, mikeonenine@web.de wrote:

mikeonenine@web.de wrote:

Revar Desmera wrote:

Err, using BOSL2, of course.

-Revar

Hmmm. Doesn’t work with me, even after changing Hz to H*z in the last line.

20sin needs to be 20*sin of course!

Now it works, thanks!

A bit slower than the original, though. Perhaps it would help if BOSL2 was incorporated in OpenSCAD instead of having to be called up.

To unsubscribe send an email to discuss-leave@lists.openscad.org

My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you. Hopefully this version takes care of that: ```` \$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15; H=2.5; // Beam slice thickness sweep( rect([50,25]), [for (z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); ``` - Revar > On Nov 1, 2023, at 4:49 PM, mikeonenine@web.de wrote: > > mikeonenine@web.de wrote: > > Revar Desmera wrote: > > Err, using BOSL2, of course. > > -Revar > > Hmmm. Doesn’t work with me, even after changing Hz to H*z in the last line. > > 20sin needs to be 20*sin of course! > > Now it works, thanks! > > A bit slower than the original, though. Perhaps it would help if BOSL2 was incorporated in OpenSCAD instead of having to be called up. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
M
mikeonenine@web.de
Thu, Nov 2, 2023 12:15 AM

Revar Desmera wrote:

My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you.
Hopefully this version takes care of that:

``````\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
sweep(
rect([50,25]),
[for (z=[-180:1:180])
up(H*z) * back(20*sin(\$t*360)*sin(z))]
);

``````

Strange (to me) new vocabulary: up, back and markdown processing!

I have encountered markdown processing before, I think, when downloads haven’t worked. Some kind of conspiracy?

Revar Desmera wrote: > My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you. > Hopefully this version takes care of that: > > ``` > \$vpt=[ 20, 20, -80 ]; > \$vpr=[ 170, 45, 180 ]; > \$vpd=2000; > \$vpf=15; > H=2.5; // Beam slice thickness > sweep( > rect([50,25]), > [for (z=[-180:1:180]) > up(H*z) * back(20*sin(\$t*360)*sin(z))] > ); > > ``` Strange (to me) new vocabulary: up, back and markdown processing! I have encountered markdown processing before, I think, when downloads haven’t worked. Some kind of conspiracy?
M
mikeonenine@web.de
Thu, Nov 2, 2023 10:20 PM

Revar Desmera wrote:

My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you.
Hopefully this version takes care of that:

``````\$vpt=[ 20, 20, -80 ];
\$vpr=[ 170, 45, 180 ];
\$vpd=2000;
\$vpf=15;
H=2.5; // Beam slice thickness
sweep(
rect([50,25]),
[for (z=[-180:1:180])
up(H*z) * back(20*sin(\$t*360)*sin(z))]
);
``````
• Revar
``````
``````
• The code gives sine motion in one plane nicely, but I need a cosine motion in another plane, too. I thought I would be able to derive that from the code, but I can’t see how to do it. How does one get a compound deflection with components in two planes ?

• Which language is the code?

• Btw I wanted to see if I could find anything in GitHub, but I couldn’t get in. What’s happened to GitHub?

Revar Desmera wrote: > My post actually did have those multiplier asterisks, but I suspect something tried to do markdown processing on it for you. > Hopefully this version takes care of that: > > ``` > \$vpt=[ 20, 20, -80 ]; > \$vpr=[ 170, 45, 180 ]; > \$vpd=2000; > \$vpf=15; > H=2.5; // Beam slice thickness > sweep( > rect([50,25]), > [for (z=[-180:1:180]) > up(H*z) * back(20*sin(\$t*360)*sin(z))] > ); > ``` > > > - Revar > > ``` * The code gives sine motion in one plane nicely, but I need a cosine motion in another plane, too. I thought I would be able to derive that from the code, but I can’t see how to do it. How does one get a compound deflection with components in two planes ? * Which language is the code? * Btw I wanted to see if I could find anything in GitHub, but I couldn’t get in. What’s happened to GitHub?
K
Ken
Fri, Nov 3, 2023 4:23 AM

Revar, just for my own interest I ran this code snippet and all it
produced was a straight beam- am I missing something from the previous

Revar Desmera wrote:

`````` My post actually did have those multiplier asterisks, but I
suspect something tried to do markdown processing on it for you.
Hopefully this version takes care of that:

|\$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15;
H=2.5; // Beam slice thickness sweep( rect([50,25]), [for
(z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); ``` -
Revar |_____________________________________________
``````

## -- Cheers, Ken bats059@gmail.comhttps://vk7krj.comhttps://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Revar, just for my own interest I ran this code snippet and all it produced was a straight beam- am I missing something from the previous discussion? (I did include BOSL2/std.scad) > Revar Desmera wrote: > > My post actually did have those multiplier asterisks, but I > suspect something tried to do markdown processing on it for you. > Hopefully this version takes care of that: > > |\$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15; > H=2.5; // Beam slice thickness sweep( rect([50,25]), [for > (z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); ``` - > Revar |_____________________________________________ > -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!
M
mikeonenine@web.de
Fri, Nov 3, 2023 7:05 AM

Ken wrote:

Revar, just for my own interest I ran this code snippet and all it
produced was a straight beam- am I missing something from the previous

Revar Desmera wrote:

``````My post actually did have those multiplier asterisks, but I
suspect something tried to do markdown processing on it for you.
Hopefully this version takes care of that:

|\$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15;
H=2.5; // Beam slice thickness sweep( rect([50,25]), [for
(z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); ``` -
Revar |_____________________________________________
``````

## --

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

Try a bit of animation, it works wonders.

@ Revar: Please see my message date stamped Thu, Nov 2, 2023 6:20 PM.

Ken wrote: > Revar, just for my own interest I ran this code snippet and all it > produced was a straight beam- am I missing something from the previous > discussion? (I did include BOSL2/std.scad) > > > Revar Desmera wrote: > > > > ``` > > My post actually did have those multiplier asterisks, but I > > suspect something tried to do markdown processing on it for you. > > Hopefully this version takes care of that: > > > > |\$vpt=[ 20, 20, -80 ]; \$vpr=[ 170, 45, 180 ]; \$vpd=2000; \$vpf=15; > > H=2.5; // Beam slice thickness sweep( rect([50,25]), [for > > (z=[-180:1:180]) up(H*z) * back(20*sin(\$t*360)*sin(z))] ); ``` - > > Revar |_____________________________________________ > > ``` > > ## -- > Cheers, Ken > bats059@gmail.com > https://vk7krj.com > https://vk7krj.com/running.html > > A baby can be defined as an ego with a noise at one end and a smell at the other. > Your job as parents is to teach them to control all three. > My job as a grandad is to tell you how you are doing it all wrong! Try a bit of animation, it works wonders. @ Revar: Please see my message date stamped Thu, Nov 2, 2023 6:20 PM.