### creating surfaces SP
Sanjeev Prabhakar
Sat, Oct 28, 2023 6:31 AM

method of creating surfaces with 2 sketches

method of creating surfaces with 2 sketches RD
Revar Desmera
Sat, Oct 28, 2023 8:41 PM

Nice. Though I think that you need to add an operator function argument, because there's more than one way to combine those waves.  You show what appears to be a multiplicative surface, but an additive surface is another valid interpretation, yet has a rather different result:

function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [
for(ypt = ywave) [
for(xpt = xwave)
[xpt.x, ypt.y, oper(xpt.z,ypt.z)]
]
];

function surf_extrude(surfpts, height) =
vnf_vertex_array(
[for (row=surfpts) concat(row, down(height, p=reverse(row)))],
caps=true, col_wrap=true, row_wrap=false
);

xywave = [for (i = [0:2:100]) [i,2sin(3i*360/100)]];
xzwave = xrot(90, p=path3d(xywave));
yzwave = zrot(90, p=xzwave);
surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y);
vnf = surf_extrude(surfpts, 0.1);
vnf_polyhedron(vnf, convexity=10);

-Revar

On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

method of creating surfaces with 2 sketches

<creating_surfaces.pdf>_______________________________________________
To unsubscribe send an email to discuss-leave@lists.openscad.org

Nice. Though I think that you need to add an operator function argument, because there's more than one way to combine those waves. You show what appears to be a multiplicative surface, but an additive surface is another valid interpretation, yet has a rather different result: ￼ include <BOSL2/std.scad> function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [ for(ypt = ywave) [ for(xpt = xwave) [xpt.x, ypt.y, oper(xpt.z,ypt.z)] ] ]; function surf_extrude(surfpts, height) = vnf_vertex_array( [for (row=surfpts) concat(row, down(height, p=reverse(row)))], caps=true, col_wrap=true, row_wrap=false ); xywave = [for (i = [0:2:100]) [i,2*sin(3*i*360/100)]]; xzwave = xrot(90, p=path3d(xywave)); yzwave = zrot(90, p=xzwave); surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y); vnf = surf_extrude(surfpts, 0.1); vnf_polyhedron(vnf, convexity=10); -Revar > On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > method of creating surfaces with 2 sketches > > > <creating_surfaces.pdf>_______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org SP
Sanjeev Prabhakar
Sun, Oct 29, 2023 1:19 AM

Thanks
Will try this

On Sun, 29 Oct, 2023, 2:11 am Revar Desmera, revarbat@gmail.com wrote:

Nice. Though I think that you need to add an operator function argument,
because there's more than one way to combine those waves.  You show what
appears to be a multiplicative surface, but an additive surface is another
valid interpretation, yet has a rather different result:

[image: Screenshot 2023-10-28 at 1.38.51 PM.png]

function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [
for(ypt = ywave) [
for(xpt = xwave)
[xpt.x, ypt.y, oper(xpt.z,ypt.z)]
]
];

function surf_extrude(surfpts, height) =
vnf_vertex_array(
[for (row=surfpts) concat(row, down(height, p=reverse(row)))],
caps=true, col_wrap=true, row_wrap=false
);

xywave = [for (i = [0:2:100]) [i,2sin(3i*360/100)]];
xzwave = xrot(90, p=path3d(xywave));
yzwave = zrot(90, p=xzwave);
surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y);
vnf = surf_extrude(surfpts, 0.1);
vnf_polyhedron(vnf, convexity=10);

-Revar

On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

method of creating surfaces with 2 sketches

<creating_surfaces.pdf>_______________________________________________
To unsubscribe send an email to discuss-leave@lists.openscad.org

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

Thanks Will try this On Sun, 29 Oct, 2023, 2:11 am Revar Desmera, <revarbat@gmail.com> wrote: > Nice. Though I think that you need to add an operator function argument, > because there's more than one way to combine those waves. You show what > appears to be a multiplicative surface, but an additive surface is another > valid interpretation, yet has a rather different result: > > > [image: Screenshot 2023-10-28 at 1.38.51 PM.png] > > include <BOSL2/std.scad> > > function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [ > for(ypt = ywave) [ > for(xpt = xwave) > [xpt.x, ypt.y, oper(xpt.z,ypt.z)] > ] > ]; > > function surf_extrude(surfpts, height) = > vnf_vertex_array( > [for (row=surfpts) concat(row, down(height, p=reverse(row)))], > caps=true, col_wrap=true, row_wrap=false > ); > > xywave = [for (i = [0:2:100]) [i,2*sin(3*i*360/100)]]; > xzwave = xrot(90, p=path3d(xywave)); > yzwave = zrot(90, p=xzwave); > surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y); > vnf = surf_extrude(surfpts, 0.1); > vnf_polyhedron(vnf, convexity=10); > > > > -Revar > > > On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > > method of creating surfaces with 2 sketches > > > <creating_surfaces.pdf>_______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > RD
Revar Desmera
Sun, Oct 29, 2023 5:38 AM

You can get interesting effects using `min()` or `max()` on combinations of sine and triangle wave inputs.

• Revar

On Oct 28, 2023, at 6:19 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

Thanks
Will try this

On Sun, 29 Oct, 2023, 2:11 am Revar Desmera, <revarbat@gmail.com mailto:revarbat@gmail.com> wrote:

Nice. Though I think that you need to add an operator function argument, because there's more than one way to combine those waves.  You show what appears to be a multiplicative surface, but an additive surface is another valid interpretation, yet has a rather different result:

function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [
for(ypt = ywave) [
for(xpt = xwave)
[xpt.x, ypt.y, oper(xpt.z,ypt.z)]
]
];

function surf_extrude(surfpts, height) =
vnf_vertex_array(
[for (row=surfpts) concat(row, down(height, p=reverse(row)))],
caps=true, col_wrap=true, row_wrap=false
);

xywave = [for (i = [0:2:100]) [i,2sin(3i*360/100)]];
xzwave = xrot(90, p=path3d(xywave));
yzwave = zrot(90, p=xzwave);
surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y);
vnf = surf_extrude(surfpts, 0.1);
vnf_polyhedron(vnf, convexity=10);

-Revar

On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar <sprabhakar2006@gmail.com mailto:sprabhakar2006@gmail.com> wrote:

method of creating surfaces with 2 sketches

<creating_surfaces.pdf>_______________________________________________

<Screenshot 2023-10-28 at 1.38.51 PM.png><Screenshot 2023-10-28 at 1.38.51 PM.png>_______________________________________________
To unsubscribe send an email to discuss-leave@lists.openscad.org SP
Sanjeev Prabhakar
Sun, Oct 29, 2023 10:07 AM

very nice.
other interesting shapes
[image: Screenshot 2023-10-29 at 3.21.18 PM.png]

On Sun, 29 Oct 2023 at 11:08, Revar Desmera revarbat@gmail.com wrote:

You can get interesting effects using `min()` or `max()` on combinations
of sine and triangle wave inputs.

[image: Screenshot 2023-10-28 at 10.37.21 PM.png]

• Revar

On Oct 28, 2023, at 6:19 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Thanks
Will try this

On Sun, 29 Oct, 2023, 2:11 am Revar Desmera, revarbat@gmail.com wrote:

Nice. Though I think that you need to add an operator function argument,
because there's more than one way to combine those waves.  You show what
appears to be a multiplicative surface, but an additive surface is another
valid interpretation, yet has a rather different result:

[image: Screenshot 2023-10-28 at 1.38.51 PM.png]

function surface_from_2_waves(xwave, ywave, oper = function(x,y) x*y) = [
for(ypt = ywave) [
for(xpt = xwave)
[xpt.x, ypt.y, oper(xpt.z,ypt.z)]
]
];

function surf_extrude(surfpts, height) =
vnf_vertex_array(
[for (row=surfpts) concat(row, down(height, p=reverse(row)))],
caps=true, col_wrap=true, row_wrap=false
);

xywave = [for (i = [0:2:100]) [i,2sin(3i*360/100)]];
xzwave = xrot(90, p=path3d(xywave));
yzwave = zrot(90, p=xzwave);
surfpts = surface_from_2_waves(xzwave, yzwave, function(x,y) x+y);
vnf = surf_extrude(surfpts, 0.1);
vnf_polyhedron(vnf, convexity=10);

-Revar

On Oct 27, 2023, at 11:31 PM, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

method of creating surfaces with 2 sketches

<creating_surfaces.pdf>_______________________________________________
To unsubscribe send an email to discuss-leave@lists.openscad.org

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

<Screenshot 2023-10-28 at 1.38.51 PM.png><Screenshot 2023-10-28 at
1.38.51 PM.png>_______________________________________________
To unsubscribe send an email to discuss-leave@lists.openscad.org

To unsubscribe send an email to discuss-leave@lists.openscad.org SP
Sanjeev Prabhakar
Sun, Oct 29, 2023 10:16 AM

another one
[image: Screenshot 2023-10-29 at 3.44.57 PM.png]

another one [image: Screenshot 2023-10-29 at 3.44.57 PM.png] RD
Revar Desmera
Sun, Oct 29, 2023 8:50 PM

Square waves multiplied together get a checkerboard, but add them instead and you get this:

• Revar
Square waves multiplied together get a checkerboard, but add them instead and you get this: - Revar SP
Sanjeev Prabhakar
Mon, Oct 30, 2023 2:29 PM

Good learning
I could reproduce the same

[image: Screenshot 2023-10-30 at 7.57.42 PM.png]

Good learning I could reproduce the same [image: Screenshot 2023-10-30 at 7.57.42 PM.png] RD
Revar Desmera
Mon, Oct 30, 2023 8:59 PM

Found a fun one!  You can do a quilted looking surface by getting the `norm()` of two sine waves:

• Revar

On Oct 30, 2023, at 7:29 AM, Sanjeev Prabhakar sprabhakar2006@gmail.com wrote:

Good learning
I could reproduce the same

<Screenshot 2023-10-30 at 7.57.42 PM.png>

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

Found a fun one! You can do a quilted looking surface by getting the `norm()` of two sine waves: - Revar > On Oct 30, 2023, at 7:29 AM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > Good learning > I could reproduce the same > > <Screenshot 2023-10-30 at 7.57.42 PM.png> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org J
jon
Tue, Oct 31, 2023 12:02 AM

It would be great to have a library of these shapes.  I'm sure they
will come in handy from time to time.

On 10/30/2023 4:59 PM, Revar Desmera wrote:

Found a fun one!  You can do a quilted looking surface by getting the
`norm()` of two sine waves:

• Revar
It would be great to have a library of these shapes.  I'm sure they will come in handy from time to time. On 10/30/2023 4:59 PM, Revar Desmera wrote: > Found a fun one!  You can do a quilted looking surface by getting the > `norm()` of two sine waves: > > > > - Revar