CA
craig and heather
Mon, May 10, 2021 11:44 AM
Any ideas how to model this in OpenSCAD? I am relatively new to modeling so
any suggestions would be appreciated.
--
Craig Lindley
Any ideas how to model this in OpenSCAD? I am relatively new to modeling so
any suggestions would be appreciated.
--
Craig Lindley
L
LenStruttmann
Mon, May 10, 2021 10:04 PM
here's a start
http://forum.openscad.org/file/t3150/Screenshot_from_2021-05-10_17-03-09.png
//***********************************
$fn = 24;
for ( a=[0:1:3360] )
{
translate( [ a, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 4 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
here's a start
<http://forum.openscad.org/file/t3150/Screenshot_from_2021-05-10_17-03-09.png>
//***********************************
$fn = 24;
for ( a=[0:1:3*360] )
{
translate( [ a, 10*sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 4 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
CA
craig and heather
Mon, May 10, 2021 10:44 PM
excellent I run with this and see what happens
thanks
On Mon, May 10, 2021 at 4:04 PM LenStruttmann LenStruttmann@gmail.com
wrote:
here's a start
//***********************************
$fn = 24;
for ( a=[0:1:3360] )
{
translate( [ a, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 4 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
Craig Lindley / Heather Hubbard
New Recordings are here http://craigandheather.net/spellbound.html
Personal Website is here http://craigandheather.net
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
excellent I run with this and see what happens
thanks
On Mon, May 10, 2021 at 4:04 PM LenStruttmann <LenStruttmann@gmail.com>
wrote:
> here's a start
>
>
>
> //***********************************
> $fn = 24;
>
> for ( a=[0:1:3*360] )
> {
> translate( [ a, 10*sin(a), 0 ] )
> scale( [ 1, 10-.009*a, 1 ] )
> segment();
> }
>
>
> module segment()
> {
> rotate( [ 0, 90, 0 ] )
> linear_extrude( 4 )
> hull()
> for (i=[-1:2:1])
> {
> translate( [ 0, i*5, 0 ] )
> circle( 5 );
> }
> }
>
> ------------------------------
> Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/>
> at Nabble.com.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
--
Craig Lindley / Heather Hubbard
New Recordings are here <http://craigandheather.net/spellbound.html>
Personal Website is here <http://craigandheather.net>
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
L
LenStruttmann
Tue, May 11, 2021 12:23 AM
Adding a few more lines of code turns it into a sun. Thanks! This has been
fun!
http://forum.openscad.org/file/t3150/Screenshot_from_2021-05-10_19-21-36.png
//*********************************
$fn = 24;
rotate( [ 0, 0, 45 ] )
fourRays( 600 );
fourRays( 1000 );
module fourRays( r )
{
for (a=[0:90:270])
{
rotate( [ 0, 0, a ] )
ray(r);
}
}
module ray( r )
{
k = r / (3360);
for ( a=[0:1:3360] )
{
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 4 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
Adding a few more lines of code turns it into a sun. Thanks! This has been
fun!
<http://forum.openscad.org/file/t3150/Screenshot_from_2021-05-10_19-21-36.png>
//*********************************
$fn = 24;
rotate( [ 0, 0, 45 ] )
fourRays( 600 );
fourRays( 1000 );
module fourRays( r )
{
for (a=[0:90:270])
{
rotate( [ 0, 0, a ] )
ray(r);
}
}
module ray( r )
{
k = r / (3*360);
for ( a=[0:1:3*360] )
{
translate( [ k*a, 10*sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 4 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
L
LenStruttmann
Tue, May 11, 2021 12:43 AM
WARNING: Before you actually try to Render (F6) that, change these two lines:
module ray( r )
{
k = r / (3360);
for ( a=[0:20:3360] ) // <------------------- CHANGE TO THIS
{
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 20 ) // <------------------- CHANGE TO THIS
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
WARNING: Before you actually try to Render (F6) that, change these two lines:
module ray( r )
{
k = r / (3*360);
for ( a=[0:20:3*360] ) // <------------------- CHANGE TO THIS
{
translate( [ k*a, 10*sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 20 ) // <------------------- CHANGE TO THIS
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
CA
craig and heather
Tue, May 11, 2021 12:48 AM
Len,
Thanks for all of your effort to help. Another thing I am wondering is how
would the code change to make the ray thicker in the Z direction. Like 1/2
inch thick?
On Mon, May 10, 2021 at 6:44 PM LenStruttmann LenStruttmann@gmail.com
wrote:
WARNING: Before you actually try to Render (F6) that, change these two
lines:
module ray( r )
{
k = r / (3360);
for ( a=[0:20:3360] ) // <------------------- CHANGE TO THIS
{
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 20 ) // <------------------- CHANGE TO THIS
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*5, 0 ] )
circle( 5 );
}
}
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
Craig Lindley / Heather Hubbard
New Recordings are here http://craigandheather.net/spellbound.html
Personal Website is here http://craigandheather.net
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
Len,
Thanks for all of your effort to help. Another thing I am wondering is how
would the code change to make the ray thicker in the Z direction. Like 1/2
inch thick?
On Mon, May 10, 2021 at 6:44 PM LenStruttmann <LenStruttmann@gmail.com>
wrote:
> WARNING: Before you actually try to Render (F6) that, change these two
> lines:
>
> module ray( r )
> {
> k = r / (3*360);
> for ( a=[0:20:3*360] ) // <------------------- CHANGE TO THIS
> {
> translate( [ k*a, 10*sin(a), 0 ] )
> scale( [ 1, 10-.009*a, 1 ] )
> segment();
> }
> }
>
> module segment()
> {
> rotate( [ 0, 90, 0 ] )
> linear_extrude( 20 ) // <------------------- CHANGE TO THIS
> hull()
> for (i=[-1:2:1])
> {
> translate( [ 0, i*5, 0 ] )
> circle( 5 );
> }
> }
>
> ------------------------------
> Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/>
> at Nabble.com.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
--
Craig Lindley / Heather Hubbard
New Recordings are here <http://craigandheather.net/spellbound.html>
Personal Website is here <http://craigandheather.net>
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
L
LenStruttmann
Tue, May 11, 2021 1:20 AM
Ha-ha! Coincidentally, that was the exact question I had for myself.
So, here's the final version of the sun. The scale() at the top gives a
final result that I could, if I wanted, print on my 3D printer: 202mm x
202mm x 10mm, which is a little bit less that 1/2 inch.
Enjoy!
//*********************************
$fn = 24;
scale( [ 0.1, 0.1, 1 ] )
sun();
module sun()
{
rotate( [ 0, 0, 45 ] )
fourRays( 600 );
fourRays( 1000 );
}
module fourRays( r )
{
for (a=[0:90:270])
{
rotate( [ 0, 0, a ] )
ray(r);
}
}
module ray( r )
{
k = r / (3360);
for ( a=[0:10:3360] )
{
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 10 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*3, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
Ha-ha! Coincidentally, that was the exact question I had for myself.
So, here's the final version of the sun. The scale() at the top gives a
final result that I could, if I wanted, print on my 3D printer: 202mm x
202mm x 10mm, which is a little bit less that 1/2 inch.
Enjoy!
//*********************************
$fn = 24;
scale( [ 0.1, 0.1, 1 ] )
sun();
module sun()
{
rotate( [ 0, 0, 45 ] )
fourRays( 600 );
fourRays( 1000 );
}
module fourRays( r )
{
for (a=[0:90:270])
{
rotate( [ 0, 0, a ] )
ray(r);
}
}
module ray( r )
{
k = r / (3*360);
for ( a=[0:10:3*360] )
{
translate( [ k*a, 10*sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 10 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*3, 0 ] )
circle( 5 );
}
}
--
Sent from: http://forum.openscad.org/
CA
craig and heather
Tue, May 11, 2021 1:27 AM
Thanks again. I will be analyzing your code to try and understand it. I've
only been working with OpenSCAD for about 3 months so I have a rather large
learning curve to climb. You must be very comfortable with OpenSCAD to be
able to generate this code so quickly.
On Mon, May 10, 2021 at 7:21 PM LenStruttmann LenStruttmann@gmail.com
wrote:
Ha-ha! Coincidentally, that was the exact question I had for myself.
So, here's the final version of the sun. The scale() at the top gives a
final result that I could, if I wanted, print on my 3D printer: 202mm x
202mm x 10mm, which is a little bit less that 1/2 inch.
Enjoy!
//*********************************
$fn = 24;
scale( [ 0.1, 0.1, 1 ] )
sun();
module sun()
{
rotate( [ 0, 0, 45 ] )
fourRays( 600 );
fourRays( 1000 );
}
module fourRays( r )
{
for (a=[0:90:270])
{
rotate( [ 0, 0, a ] )
ray(r);
}
}
module ray( r )
{
k = r / (3360);
for ( a=[0:10:3360] )
{
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
}
}
module segment()
{
rotate( [ 0, 90, 0 ] )
linear_extrude( 10 )
hull()
for (i=[-1:2:1])
{
translate( [ 0, i*3, 0 ] )
circle( 5 );
}
}
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
--
Craig Lindley / Heather Hubbard
New Recordings are here http://craigandheather.net/spellbound.html
Personal Website is here http://craigandheather.net
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
Thanks again. I will be analyzing your code to try and understand it. I've
only been working with OpenSCAD for about 3 months so I have a rather large
learning curve to climb. You must be very comfortable with OpenSCAD to be
able to generate this code so quickly.
On Mon, May 10, 2021 at 7:21 PM LenStruttmann <LenStruttmann@gmail.com>
wrote:
> Ha-ha! Coincidentally, that was the exact question I had for myself.
>
> So, here's the final version of the sun. The scale() at the top gives a
> final result that I could, if I wanted, print on my 3D printer: 202mm x
> 202mm x 10mm, which is a little bit less that 1/2 inch.
>
> Enjoy!
>
> //*********************************
> $fn = 24;
>
> scale( [ 0.1, 0.1, 1 ] )
> sun();
>
>
> module sun()
> {
> rotate( [ 0, 0, 45 ] )
> fourRays( 600 );
>
> fourRays( 1000 );
> }
>
>
> module fourRays( r )
> {
> for (a=[0:90:270])
> {
> rotate( [ 0, 0, a ] )
> ray(r);
> }
> }
>
>
> module ray( r )
> {
> k = r / (3*360);
> for ( a=[0:10:3*360] )
> {
> translate( [ k*a, 10*sin(a), 0 ] )
> scale( [ 1, 10-.009*a, 1 ] )
> segment();
> }
> }
>
>
> module segment()
> {
> rotate( [ 0, 90, 0 ] )
> linear_extrude( 10 )
> hull()
> for (i=[-1:2:1])
> {
> translate( [ 0, i*3, 0 ] )
> circle( 5 );
> }
> }
>
> ------------------------------
> Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/>
> at Nabble.com.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
--
Craig Lindley / Heather Hubbard
New Recordings are here <http://craigandheather.net/spellbound.html>
Personal Website is here <http://craigandheather.net>
Please call the Rockrimmon house. Our cell phones don't work at home.
Rockrimmon House: (719) 426-9873
Craig's Cell: (719) 502-7925
Heather's Cell: (719) 571-0944
If you’re one in a million, there are now more than seven thousand people
exactly like you.
L
LenStruttmann
Tue, May 11, 2021 1:55 AM
Just start with the lowest module, segment(). You can call it by itself and
see what it does. Then, each higher module does something with the
previously developed modules, step by step.
Actually, I've only been using my 3D printer and OpenSCAD for about 6
months. Yes, there is a bit of a learning curve. But, I've been
programming for over 45 years; I usually find OpenSCAD easier to use than
the graphics-oriented systems. Enjoy! Don't be afraid to ask questions
here and in other forums.
Len
--
Sent from: http://forum.openscad.org/
Just start with the lowest module, segment(). You can call it by itself and
see what it does. Then, each higher module does something with the
previously developed modules, step by step.
Actually, I've only been using my 3D printer and OpenSCAD for about 6
months. Yes, there is a bit of a learning curve. But, I've been
programming for over 45 years; I usually find OpenSCAD easier to use than
the graphics-oriented systems. Enjoy! Don't be afraid to ask questions
here and in other forums.
Len
--
Sent from: http://forum.openscad.org/
D
dpa
Tue, May 11, 2021 9:45 AM
I waited for the BOSL2 solution ;) but tried myself Lens cool approach to
make it cleaner (less 'steppy')
this is the result: exchange the module ray():
// <--
module ray( r ) {
step = 10;
k = r / (3360);
for ( a=[0:step:3360-step] )
{
hull() {
translate( [ ka, 10sin(a), 0 ] )
scale( [ 1, 10-.009a, 1 ] )
segment();
b = a + step;
translate( [ kb, 10sin(b), 0 ] )
scale( [ 1, 10-.009b, 1 ] )
segment();
}
}
}
// >
You could now set the segment extrusion from 10 to something little (e.g.
0.1) but it works also with 10.
Am Di., 11. Mai 2021 um 03:55 Uhr schrieb LenStruttmann <
LenStruttmann@gmail.com>:
Just start with the lowest module, segment(). You can call it by itself
and see what it does. Then, each higher module does something with the
previously developed modules, step by step.
Actually, I've only been using my 3D printer and OpenSCAD for about 6
months. Yes, there is a bit of a learning curve. But, I've been
programming for over 45 years; I usually find OpenSCAD easier to use than
the graphics-oriented systems. Enjoy! Don't be afraid to ask questions
here and in other forums.
Len
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I waited for the BOSL2 solution ;) but tried myself Lens cool approach to
make it cleaner (less 'steppy')
this is the result: exchange the module ray():
// <--
module ray( r ) {
step = 10;
k = r / (3*360);
for ( a=[0:step:3*360-step] )
{
hull() {
translate( [ k*a, 10*sin(a), 0 ] )
scale( [ 1, 10-.009*a, 1 ] )
segment();
b = a + step;
translate( [ k*b, 10*sin(b), 0 ] )
scale( [ 1, 10-.009*b, 1 ] )
segment();
}
}
}
// >
You could now set the segment extrusion from 10 to something little (e.g.
0.1) but it works also with 10.
Am Di., 11. Mai 2021 um 03:55 Uhr schrieb LenStruttmann <
LenStruttmann@gmail.com>:
> Just start with the lowest module, segment(). You can call it by itself
> and see what it does. Then, each higher module does something with the
> previously developed modules, step by step.
>
> Actually, I've only been using my 3D printer and OpenSCAD for about 6
> months. Yes, there is a bit of a learning curve. But, I've been
> programming for over 45 years; I usually find OpenSCAD easier to use than
> the graphics-oriented systems. Enjoy! Don't be afraid to ask questions
> here and in other forums.
>
> Len
> ------------------------------
> Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/>
> at Nabble.com.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>