discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

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:

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

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]

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

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:

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

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: >> >> >> >> >> 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 <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
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]

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

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] >> >> 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 >> > <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 >
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>


OpenSCAD mailing list
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
SP
Sanjeev Prabhakar
Tue, Oct 31, 2023 12:30 AM

Very nice
Lot to play with

Very nice Lot to play with
AM
Adrian Mariano
Tue, Oct 31, 2023 1:23 AM

Technically that surface isn't quilted, exactly.  When you make a blanket
by securing the layers at single points you do that by tying.  It's a less
secure technique than real quilting, where the layers are sewn together
along lines.

It seems like the BOSL2 texture library does collect patterns like this.

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Very nice
Lot to play with


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

Technically that surface isn't quilted, exactly. When you make a blanket by securing the layers at single points you do that by tying. It's a less secure technique than real quilting, where the layers are sewn together along lines. It seems like the BOSL2 texture library does collect patterns like this. https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Very nice > Lot to play with > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Tue, Oct 31, 2023 1:36 AM

Wonderful textures, but how did you create these?
Is it with the 2 waves method?

On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, avm4@cornell.edu wrote:

Technically that surface isn't quilted, exactly.  When you make a blanket
by securing the layers at single points you do that by tying.  It's a less
secure technique than real quilting, where the layers are sewn together
along lines.

It seems like the BOSL2 texture library does collect patterns like this.

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Very nice
Lot to play with


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

Wonderful textures, but how did you create these? Is it with the 2 waves method? On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu> wrote: > Technically that surface isn't quilted, exactly. When you make a blanket > by securing the layers at single points you do that by tying. It's a less > secure technique than real quilting, where the layers are sewn together > along lines. > > It seems like the BOSL2 texture library does collect patterns like this. > > https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures > > On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Very nice >> Lot to play with >> _______________________________________________ >> 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 >
CK
Chun Kit LAM
Tue, Oct 31, 2023 1:58 AM

Another question: I wonder if it is faster to do it with the 2 waves
method or SDF? E.g. with libfive integration in python.

On 31/10/2023 09:36, Sanjeev Prabhakar wrote:

Wonderful textures, but how did you create these?
Is it with the 2 waves method?

On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, avm4@cornell.edu wrote:

 Technically that surface isn't quilted, exactly. When you make a
 blanket by securing the layers at single points you do that by
 tying.  It's a less secure technique than real quilting, where the
 layers are sewn together along lines.

 It seems like the BOSL2 texture library does collect patterns like
 this.

 https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

 On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar
 <sprabhakar2006@gmail.com> wrote:

     Very nice
     Lot to play with
     _______________________________________________
     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

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Another question: I wonder if it is faster to do it with the 2 waves method or SDF? E.g. with libfive integration in python. On 31/10/2023 09:36, Sanjeev Prabhakar wrote: > Wonderful textures, but how did you create these? > Is it with the 2 waves method? > > On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu> wrote: > > Technically that surface isn't quilted, exactly. When you make a > blanket by securing the layers at single points you do that by > tying.  It's a less secure technique than real quilting, where the > layers are sewn together along lines. > > It seems like the BOSL2 texture library does collect patterns like > this. > > https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures > > On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > Very nice > Lot to play with > _______________________________________________ > 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 > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Tue, Oct 31, 2023 2:24 AM

Can you share some examples as to how this works?

On Tue, 31 Oct, 2023, 7:29 am Chun Kit LAM, john.lck40@gmail.com wrote:

Another question: I wonder if it is faster to do it with the 2 waves
method or SDF? E.g. with libfive integration in python.
On 31/10/2023 09:36, Sanjeev Prabhakar wrote:

Wonderful textures, but how did you create these?
Is it with the 2 waves method?

On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, avm4@cornell.edu wrote:

Technically that surface isn't quilted, exactly.  When you make a blanket
by securing the layers at single points you do that by tying.  It's a less
secure technique than real quilting, where the layers are sewn together
along lines.

It seems like the BOSL2 texture library does collect patterns like this.

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Very nice
Lot to play with


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


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

Can you share some examples as to how this works? On Tue, 31 Oct, 2023, 7:29 am Chun Kit LAM, <john.lck40@gmail.com> wrote: > Another question: I wonder if it is faster to do it with the 2 waves > method or SDF? E.g. with libfive integration in python. > On 31/10/2023 09:36, Sanjeev Prabhakar wrote: > > Wonderful textures, but how did you create these? > Is it with the 2 waves method? > > On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu> wrote: > >> Technically that surface isn't quilted, exactly. When you make a blanket >> by securing the layers at single points you do that by tying. It's a less >> secure technique than real quilting, where the layers are sewn together >> along lines. >> >> It seems like the BOSL2 texture library does collect patterns like this. >> >> https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures >> >> On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> Very nice >>> Lot to play with >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > 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 >
CK
Chun Kit LAM
Tue, Oct 31, 2023 2:57 AM

Just something like abs(z - sin(x) - sin(y)) <= d/2, where d is the
desired thickness.

I don't have time to compile the python integration for now so I just
tried it with manifold sdf. The surface is not very smooth due to
marching cubes used. It is probably better to do it with the method in
BOSL2.

On 31/10/2023 10:24, Sanjeev Prabhakar wrote:

Can you share some examples as to how this works?

On Tue, 31 Oct, 2023, 7:29 am Chun Kit LAM, john.lck40@gmail.com wrote:

 Another question: I wonder if it is faster to do it with the 2
 waves method or SDF? E.g. with libfive integration in python.

 On 31/10/2023 09:36, Sanjeev Prabhakar wrote:
 Wonderful textures, but how did you create these?
 Is it with the 2 waves method?

 On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu>
 wrote:

     Technically that surface isn't quilted, exactly.  When you
     make a blanket by securing the layers at single points you do
     that by tying.  It's a less secure technique than real
     quilting, where the layers are sewn together along lines.

     It seems like the BOSL2 texture library does collect patterns
     like this.

     https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

     On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar
     <sprabhakar2006@gmail.com> wrote:

         Very nice
         Lot to play with
         _______________________________________________
         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


 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email todiscuss-leave@lists.openscad.org
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Just something like abs(z - sin(x) - sin(y)) <= d/2, where d is the desired thickness. I don't have time to compile the python integration for now so I just tried it with manifold sdf. The surface is not very smooth due to marching cubes used. It is probably better to do it with the method in BOSL2. On 31/10/2023 10:24, Sanjeev Prabhakar wrote: > Can you share some examples as to how this works? > > On Tue, 31 Oct, 2023, 7:29 am Chun Kit LAM, <john.lck40@gmail.com> wrote: > > Another question: I wonder if it is faster to do it with the 2 > waves method or SDF? E.g. with libfive integration in python. > > On 31/10/2023 09:36, Sanjeev Prabhakar wrote: >> Wonderful textures, but how did you create these? >> Is it with the 2 waves method? >> >> On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu> >> wrote: >> >> Technically that surface isn't quilted, exactly.  When you >> make a blanket by securing the layers at single points you do >> that by tying.  It's a less secure technique than real >> quilting, where the layers are sewn together along lines. >> >> It seems like the BOSL2 texture library does collect patterns >> like this. >> >> https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures >> >> On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar >> <sprabhakar2006@gmail.com> wrote: >> >> Very nice >> Lot to play with >> _______________________________________________ >> 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 >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
RD
Revar Desmera
Tue, Oct 31, 2023 3:08 AM

All the BOSL2 textures were created by hand, I'm afraid.  I had a need to do things like knurling on some parts, and that generalized into textures.  Since heightfields were insufficient to make some textures cleanly, I expanded the system out to allow more precise VNF based textures.  I just made a bunch of standard textures that seemed useful.  Textures can be applied to cyl()s, rotate_sweep()s, and linear_sweep()s.

You CAN use the two-wave technique to generate heightfields or VNFs that are useable as textures, but you have to beware how many vertices you introduce.
The fact that you can generate the diamonds I originally needed for knurling via the 2-wave method was actually an interesting surprise to me, though it's far more expensive in vertex counts.  The manually created heightfield texture for diamonds in BOSL2 is actually just [[0,1], [1,0]].

  • Revar

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

Wonderful textures, but how did you create these?
Is it with the 2 waves method?

On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu mailto:avm4@cornell.edu> wrote:

Technically that surface isn't quilted, exactly.  When you make a blanket by securing the layers at single points you do that by tying.  It's a less secure technique than real quilting, where the layers are sewn together along lines.

It seems like the BOSL2 texture library does collect patterns like this.

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures

On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com mailto:sprabhakar2006@gmail.com> wrote:

Very nice
Lot to play with


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


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

All the BOSL2 textures were created by hand, I'm afraid. I had a need to do things like knurling on some parts, and that generalized into textures. Since heightfields were insufficient to make some textures cleanly, I expanded the system out to allow more precise VNF based textures. I just made a bunch of standard textures that seemed useful. Textures can be applied to `cyl()`s, `rotate_sweep()`s, and `linear_sweep()`s. You CAN use the two-wave technique to generate heightfields or VNFs that are useable as textures, but you have to beware how many vertices you introduce. The fact that you can generate the diamonds I originally needed for knurling via the 2-wave method was actually an interesting surprise to me, though it's far more expensive in vertex counts. The manually created heightfield texture for diamonds in BOSL2 is actually just `[[0,1], [1,0]]`. - Revar > On Oct 30, 2023, at 6:36 PM, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > > Wonderful textures, but how did you create these? > Is it with the 2 waves method? > > On Tue, 31 Oct, 2023, 6:54 am Adrian Mariano, <avm4@cornell.edu <mailto:avm4@cornell.edu>> wrote: >> Technically that surface isn't quilted, exactly. When you make a blanket by securing the layers at single points you do that by tying. It's a less secure technique than real quilting, where the layers are sewn together along lines. >> >> It seems like the BOSL2 texture library does collect patterns like this. >> >> https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#subsection-vnf-textures >> >> On Mon, Oct 30, 2023 at 8:31 PM Sanjeev Prabhakar <sprabhakar2006@gmail.com <mailto:sprabhakar2006@gmail.com>> wrote: >>> Very nice >>> Lot to play with >>> _______________________________________________ >>> 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> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Tue, Oct 31, 2023 4:23 PM

textured box

[image: Screenshot 2023-10-31 at 9.52.16 PM.png]

textured box [image: Screenshot 2023-10-31 at 9.52.16 PM.png]
SP
Sanjeev Prabhakar
Tue, Oct 31, 2023 4:30 PM
scad file link is here (4.6 mb): https://github.com/sprabhakar2006/openSCAD/blob/main/textured_box.scad