POV-Ray : Newsgroups : povray.unofficial.patches : Simple flat curves Server Time
2 Nov 2024 05:19:48 EDT (-0400)
  Simple flat curves (Message 1 to 8 of 8)  
From: Nigel Warner
Subject: Simple flat curves
Date: 1 Apr 2000 07:56:52
Message: <38E5F21F.E6649CF6@freenetname.co.uk>
Dear all,

    I am trying to work out which of the various patches I need to do
the following.

    I want to draw a curved line between two points varying the
thickness
of the line as I go as if the line was drawn with a flat nibbed pen;
thinner at the
ends and fatter in the middle. The object I want is a slur used to join
two notes
or above a musical phrase.

    I have looked through lot's of posts but I am still non the wiser as
the maths is
all a bit confusing.. Any pointers or better still a macro I can
experiment with
would be most educational.

    Regards,

    Nigel.


Post a reply to this message

From: Bob Hughes
Subject: Re: Simple flat curves
Date: 1 Apr 2000 08:22:01
Message: <38e5f7f9@news.povray.org>
This might help if you use MegaPov:


#version unofficial MegaPov 0.4;

background {rgb 1}

sphere_sweep {
  b_spline_sphere_sweep,
   6,
  <-5, -5, 0>, 0
  <-5, 2.5, 0>, 0.1
  <-2.5, 5, 0>, 0.5
  < 2.5, -5, 0>, 1
  < 5, -2.5, 0>, 1.5
  < 5, 5, 0>, 3
 // sphere_sweep_depth_tolerance 1.0e-3
 pigment {rgb 0}
  scale <1,1,0.01>
}

light_source { <-10,10,-10>, 1}
camera {
  location  <1,1,-15>
  angle 67
  look_at   <0, 0, 0>
}


You could adjust the sphere positions and sizes to get what you're looking for I
believe.  If using POV-Ray 3.* I could only suggest using 'height_field' and/or
'image_map' with a drawing of the shape you need.  Don't know if there might be
yet another way.

Bob

"Nigel Warner" <nwa### [at] freenetnamecouk> wrote in message
news:38E5F21F.E6649CF6@freenetname.co.uk...
| Dear all,
|
|     I am trying to work out which of the various patches I need to do
| the following.
|
|     I want to draw a curved line between two points varying the
| thickness
| of the line as I go as if the line was drawn with a flat nibbed pen;
| thinner at the
| ends and fatter in the middle. The object I want is a slur used to join
| two notes
| or above a musical phrase.
|
|     I have looked through lot's of posts but I am still non the wiser as
| the maths is
| all a bit confusing.. Any pointers or better still a macro I can
| experiment with
| would be most educational.
|
|     Regards,
|
|     Nigel.
|
|
|


Post a reply to this message

From: Chris Huff
Subject: Re: Simple flat curves
Date: 1 Apr 2000 08:24:29
Message: <chrishuff_99-2C779B.08265001042000@news.povray.org>
In article <38E5F21F.E6649CF6@freenetname.co.uk>, Nigel Warner 
<nwa### [at] freenetnamecouk> wrote:

> I want to draw a curved line between two points varying the thickness 
> of the line as I go as if the line was drawn with a flat nibbed pen; 
> thinner at the ends and fatter in the middle. The object I want is a 
> slur used to join two notes or above a musical phrase.
> 
>     I have looked through lot's of posts but I am still non the wiser as
> the maths is all a bit confusing.. Any pointers or better still a 
> macro I can experiment with would be most educational.

What shape is it supposed to be?
If it is supposed to be flat, try using a polygon object. Or maybe a 
prism object is what you are looking for. These are official version 
features.

If it is shaped like a pipe with varying radius, try using the 
sphere_sweep object, available in MegaPOV.
If you want to specify certain control points and use a spline to get 
the "in-between" positions, there are two spline patches available in 
MegaPOV.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Ken
Subject: Re: Simple flat curves
Date: 1 Apr 2000 15:51:05
Message: <38E6616F.4CEAD39B@pacbell.net>
Nigel Warner wrote:
> 
> Dear all,
> 
>     I am trying to work out which of the various patches I need to do
> the following.
> 
>     I want to draw a curved line between two points varying the
> thickness
> of the line as I go as if the line was drawn with a flat nibbed pen;
> thinner at the
> ends and fatter in the middle. The object I want is a slur used to join
> two notes
> or above a musical phrase.

How about a totaly different approach. On my web page is a ttf file
available for download that is for creating musical scores. With this
file and the use of POV-Ray's ability to make 3D extruded text objects
from ttf's you need only choose the right character for your task.

Simple no ?

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Nigel Warner
Subject: Re: Simple flat curves
Date: 2 Apr 2000 06:30:35
Message: <38E72154.8F146831@freenetname.co.uk>
Ken wrote:

> How about a totaly different approach. On my web page is a ttf file
> available for download that is for creating musical scores. With this
> file and the use of POV-Ray's ability to make 3D extruded text objects
> from ttf's you need only choose the right character for your task.
>
> Simple no ?
>

 Ken,

    Unfortunately no, it is not that simple.

    I have three versions of POV, four if you count my Linux 3.1 version.
They all
display different characteristics when attempting to use TTF fonts. The
official
 release for windows refuses to draw a number of characters from a number of
fonts I have tried to work with. I am using the Mega Version to get the
bounding
data for objects and it declines to draw any glyphs from the musical symbols
font
above 127. I have also noticed that the Mega version is the best of the bunch
when it comes to reproducing glyphs from various interesting freeware fonts I
have tried. This is presumably because they contain insufficient or
inaccurate hinting or other
data.
        The problem with slurs and ties is however different. What I would
like is
, to paraphrase Metafont, "pick up a pen with a rectangular nib and draw a
curve
from here to there rotating the pen by 25 degrees as you go". Scaling images
of curved lines might be OK as my aims are modest but a lot of computation
would
be required as the curves are required sometimes to be small between two
adjacent
notes of the same pitch and in other cases need to be drawn, tastefully,
between notes widely separated vertically. In yet other cases slur marks need
to be drawn across entire phrases or bars as performance marks implying
legato or "play smoothly".
    The tricky bit is to produce something that looks crisp and elegant to
compliment
the text in which the eventual image is to be embedded; for crisp and elegant
read
mathematically derived.
    I shall have a play with Bob Hughes's suggestion but I think what I
really really want is a simple 2D Bezier curve function

    Regards,

    Nigel.

>
> --
> Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ken
Subject: Re: Simple flat curves
Date: 2 Apr 2000 06:37:57
Message: <38E7233F.D9C3AC06@pacbell.net>
Nigel Warner wrote:
> 
> Ken wrote:
> > Simple no ?

>     Unfortunately no, it is not that simple.

Are you any good with paint programs ? When all else fails if you can
create a 2d version of what you want a heightfield can easily translate
it into 3d for you. It's a possiblity anyway and there is always the
power of CSG operations. Give Bob's idea a try but if it fails...

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Bob Hughes
Subject: Re: Simple flat curves
Date: 2 Apr 2000 14:13:53
Message: <38e78de1@news.povray.org>
I was amazed to see how much is in that music.ttf font.
I tried to mimic more closely what I saw in it to make just 4 notes with the
sphere sweep.  I was terrible when learning music.
Even though it's crude I've posted it to  p.t.s-f. because some people might
want to play around with it.

Bob

"Ken" <tyl### [at] pacbellnet> wrote in message
news:38E7233F.D9C3AC06@pacbell.net...
|
|
| Nigel Warner wrote:
| >
| > Ken wrote:
| > > Simple no ?
|
| >     Unfortunately no, it is not that simple.
|
| Are you any good with paint programs ? When all else fails if you can
| create a 2d version of what you want a heightfield can easily translate
| it into 3d for you. It's a possiblity anyway and there is always the
| power of CSG operations. Give Bob's idea a try but if it fails...
|
| --
| Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
| http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Tom Melly
Subject: Re: Simple flat curves
Date: 3 Apr 2000 10:40:24
Message: <38e8ad58@news.povray.org>
You could try this standard pov approach:

intersection{
  torus{
    0.50,
    0.10
    translate z*-0.50
    rotate x*-100
  }
  plane{z, -0.0750}
  plane{-z, 0.0751} // this one can be taken out, but makes it flatter
  pigment{Green}
  scale <1,1,1> // change scaling to cover longer whatchamacallits?
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.