|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So here's a thingie I can't solve, don't know enough math to figure this one out
(I presume my problem's math-related): I want to make a sine-wave in 3D, with a
look like a b_spline (as in: rounded edges, to give it a proper 3D-look), like
the representation of a sound wave in Audacity. Could anyone help me with this
please?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Marco wrote:
> So here's a thingie I can't solve, don't know enough math to figure this one out
> (I presume my problem's math-related): I want to make a sine-wave in 3D, with a
> look like a b_spline (as in: rounded edges, to give it a proper 3D-look), like
> the representation of a sound wave in Audacity.
I'm not sure how it looks in Audacity but you might try a sphere_sweep.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> So here's a thingie I can't solve, don't know enough math to figure this one out
> (I presume my problem's math-related): I want to make a sine-wave in 3D, with a
> look like a b_spline (as in: rounded edges, to give it a proper 3D-look), like
> the representation of a sound wave in Audacity. Could anyone help me with this
> please?
>
>
You can use a sphere_sweep. Sample the sin function at sufisently small
intervals.
It's also possible to use an isosurface.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Marco wrote:
I want to make a sine-wave in 3D, with a
> > look like a b_spline (as in: rounded edges, to give it a proper 3D-look), like
> > the representation of a sound wave in Audacity.
>
> I'm not sure how it looks in Audacity but you might try a sphere_sweep.
I recently bought a turntable with USB connection so I could put old vinyl
records onto CD and it comes with Audacity. To see anything like a sine wave I
must magnify the view to the extreme, otherwise mostly see chaotic waveforms not
simple sine waves from music. Guess that's beside the point. ;)
Not sure sphere_sweep is going to be good for this since it requires a known
number of points. I could just be thinking wrong but stringing spheres together
might be easiest to work math in for variations on waveform.
Simple example here (because it's all I could do), not intended as THE solution:
/* sine or sound wave */
camera
{
location <15, 0.5, -25>
look_at <15,0.5,0>
}
#local T=25; // total time
#local I=0; // time count
#local S=0.1; // scale
#local A=3; // amplitude
#local F=0; // frequency
union
{
#while (I<T)
#local R=seed(I); // random
sphere
{
<I+F,sin(I)*A,0>, S
}
#local I=I+S;
#local F=0;// sin(I); // math to reshape wave, like sin(I*R)
#end
texture
{
pigment
{
function {abs(y)}
color_map {
[0 rgb <0,1,0>]
[1 rgb <1,0,0>]
}
scale 1+S // adjust to sphere size
}
finish
{
ambient 1
}
}
} // end union spheres
/* end sine or sound wave */
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"omniverse" <omn### [at] charternet> wrote:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
> > Marco wrote:
> I want to make a sine-wave in 3D, with a
> > > look like a b_spline (as in: rounded edges, to give it a proper 3D-look), like
> > > the representation of a sound wave in Audacity.
> >
> > I'm not sure how it looks in Audacity but you might try a sphere_sweep.
>
> I recently bought a turntable with USB connection so I could put old vinyl
> records onto CD and it comes with Audacity. To see anything like a sine wave I
> must magnify the view to the extreme, otherwise mostly see chaotic waveforms not
> simple sine waves from music. Guess that's beside the point. ;)
>
> Not sure sphere_sweep is going to be good for this since it requires a known
> number of points. I could just be thinking wrong but stringing spheres together
> might be easiest to work math in for variations on waveform.
> Simple example here (because it's all I could do), not intended as THE solution:
>
> /* sine or sound wave */
> ...
> /* end sine or sound wave */
Thank you very much! That looks beautiful, I'll just try and modify this sample,
maybe change the coloring of the spheres, maybe try to create the look of a
single thread (and not a string of spheres), and perhaps if I could create some
"cartoony" randomness to the peaks of the wave forms, that would really look
great.
Oh, and your records must be in pretty bad shape if you can't see the sine wave
(or maybe I always zoom in very far with Audacity), enjoy anyway! Oh, and make
sure you record to 44k1Hz, and not 22050Hz, or if you burn it to CD it will come
out like the Smurfs (because the CDplayer will play back at 44k1 regardless)! (I
had that once, very funny, but not what I wanted at all)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Marco" <rpo### [at] gmailcom> wrote:
>
> Thank you very much! That looks beautiful, I'll just try and modify this sample,
Happy to help.
Christian and Alain are probably right about using sphere_sweep, I just have
trouble every time I try to automate the coordinates for those. I finally got it
right(?), see redone script below. Had seen Mike Raiford's post in off-topic,
Wavelet, so that got me thinking more about this.
> your records must be in pretty bad shape if you can't see the sine wave
> (or maybe I always zoom in very far with Audacity), enjoy anyway! Oh, and make
> sure you record to 44k1Hz, and not 22050Hz
Yep, that was the first thing I found out, using 44.1 not a higher (better?)
rate. That sounds fine to my ears. My records are in bad shape or well used, and
the randomized wave form of my script is about what I see when zoomed into the
Audacity graph. ;)
/* example sound wave */
#local Sweep=yes;
camera
{
location <15, 0.5, -25>
look_at <15,0.5,0>
}
#local T=25; // total time
#local I=0; // time count
#local S=0.1; // scale
#local A=3; // amplitude
#local F=0; // frequency
#if (Sweep=yes)
#local I=2; // time count
#local Ss=1; // scale
sphere_sweep
{
b_spline
T,
#while (I-2<T)
#local R=seed(I); // random
<I+F,sin(I)*A,0>, S
#local I=I+Ss;
#local F=sin(I*R);//(sin(I/2)+cos(I/3)); //sin(I);
#end
#else
union
{
#while (I<=T)
#local R=seed(I); // random
sphere
{
<I+F,sin(I)*A,0>, S
}
#local I=I+S;
#local F=0; // sin(I); // math to reshape wave, like sin(I*R)
#end
#end // if
texture
{
pigment
{
function {abs(y)}
color_map {
[0 rgb <0,1,0>]
[1 rgb <1,0,0>]
}
scale 1*A+S // adjust amplitude and sphere size
}
finish
{
ambient 1
}
}
} // end union spheres
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Thank you very much! That looks beautiful, I'll just try and modify this sample,
> maybe change the coloring of the spheres, maybe try to create the look of a
> single thread (and not a string of spheres), and perhaps if I could create some
> "cartoony" randomness to the peaks of the wave forms, that would really look
> great.
>
If you use a string of relatively short cylinders connected by spheres,
you can get something very reasonable.
The cylinders rid you of the beady aspect, and the spheres will fill up
the gaps between the cylinders.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|