method of creating surfaces with 2 sketches
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,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>_______________________________________________
OpenSCAD mailing list
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,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>_______________________________________________
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
You can get interesting effects using min()
or max()
on combinations of sine and triangle wave inputs.

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:
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,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>_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto: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>_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
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]
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]
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,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>_______________________________________________
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
<Screenshot 2023-10-28 at 1.38.51 PM.png><Screenshot 2023-10-28 at
1.38.51 PM.png>_______________________________________________
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
another one
[image: Screenshot 2023-10-29 at 3.44.57 PM.png]
Square waves multiplied together get a checkerboard, but add them instead and you get this:
Good learning
I could reproduce the same
[image: Screenshot 2023-10-30 at 7.57.42 PM.png]
Found a fun one! You can do a quilted looking surface by getting the norm()
of two sine waves:
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
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: