![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'm having trouble with this CSG.
I can't seem to cut off the sharp edge of the inner part of this letter 'c'.
The source is posted under p.t.s-f.
Help will be appreciated.
Thanks,
Nekar
--
#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);blob{#while((K-N).
x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(vlength(N-K)<vlength(
X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N,1,1 scale.02}sphere{
<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1 scale.01 }#end
pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}// Nekar Xenos
Post a reply to this message
Attachments:
Download 'Cp.jpg' (42 KB)
Preview of image 'Cp.jpg'
![Cp.jpg](/povray.binaries.images/attachment/%3C3b08d695%40news.povray.org%3E/Cp.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nekar Xenos wrote:
>
> I'm having trouble with this CSG.
> I can't seem to cut off the sharp edge of the inner part of this letter 'c'.
> The source is posted under p.t.s-f.
> Help will be appreciated.
>
Sorry, but i don't understand what exactly you are having problems with.
If you want perfectly smooth edges, you will have to use some
trigonometry, it usually helps to calculate things in the 2D case by
drawing the cross section on paper...
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I don't know if it's a bug. But if you take a look at the code under
povray.text.scene-files you'll see there is a section I marked out that doesn't
want to cut off the edge. I've checked the placement and it is in the right
place so I must be missing something.
--
#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);blob{#while((K-N).
x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(vlength(N-K)<vlength(
X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N,1,1 scale.02}sphere{
<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1 scale.01 }#end
pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}// Nekar Xenos
"Christoph Hormann" <chr### [at] gmx de> wrote in message
news:3B08FD41.74319130@gmx.de...
>
>
> Nekar Xenos wrote:
> >
> > I'm having trouble with this CSG.
> > I can't seem to cut off the sharp edge of the inner part of this letter 'c'.
> > The source is posted under p.t.s-f.
> > Help will be appreciated.
> >
>
> Sorry, but i don't understand what exactly you are having problems with.
>
> If you want perfectly smooth edges, you will have to use some
> trigonometry, it usually helps to calculate things in the 2D case by
> drawing the cross section on paper...
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmx de>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nekar Xenos wrote:
>
> I don't know if it's a bug. But if you take a look at the code under
> povray.text.scene-files you'll see there is a section I marked out that doesn't
> want to cut off the edge. I've checked the placement and it is in the right
> place so I must be missing something.
>
I checked the code and to me it seems to render just as i would expect it
(apart from missing pigment etc.)
If you could mark the edge you think that's wrong it could help.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
It was the part marked problem in the code. Thanks for your patience with me ;).
I've figured it out and fixed it now. I've still got to do the corners but that
shouldn't be a problem now.
--
/* Nekar Xenos */#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);
blob{#while((K-N).x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(
vlength(N-K)<vlength(X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N
,1,1 scale.02}sphere{<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1
scale.01 }#end pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}
"Christoph Hormann" <chr### [at] gmx de> wrote in message
news:3B09578D.F520ED61@gmx.de...
>
>
> Nekar Xenos wrote:
> >
> > I don't know if it's a bug. But if you take a look at the code under
> > povray.text.scene-files you'll see there is a section I marked out that
doesn't
> > want to cut off the edge. I've checked the placement and it is in the right
> > place so I must be missing something.
> >
>
> I checked the code and to me it seems to render just as i would expect it
> (apart from missing pigment etc.)
>
> If you could mark the edge you think that's wrong it could help.
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmx de>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Nekar Xenos who wrote:
>I don't know if it's a bug. But if you take a look at the code under
>povray.text.scene-files you'll see there is a section I marked out that doesn't
>want to cut off the edge. I've checked the placement and it is in the right
>place so I must be missing something.
Check the placement again. It's *not* in the right place.
One way to visualize what's happening is to look at the detail with an
orthographic camera, and to add a visible copy of the suspect difference
to the scene
E.g. temporarily change your camera to
camera {location <6,-4,0>
look_at <6,-4,10>
orthographic
}
And temporarily add this at the very end of the scene
difference {
box{<4,-2,18>,<7,-5,-18>}
cylinder{<7,-5,19>,<7,-5,-19> 2}
pigment {rgb x}
translate <0,0,50>
}
When you render that, you'll see that the suspect bit touches the main
object in two places. You really don't want the one around <4,-5,*>, and
the one around <7,-3,*> doesn't do very much.
I reckon that the correct shape is more like
difference {
box{<4,-2,18>,<7.5,-4,-18>}
cylinder{<7.5,-5,19>,<7.5,-5,-19> 2}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Wasn't it Nekar Xenos who wrote:
>
> >I don't know if it's a bug. But if you take a look at the code under
> >povray.text.scene-files you'll see there is a section I marked out that
doesn't
> >want to cut off the edge. I've checked the placement and it is in the right
> >place so I must be missing something.
Looks like it - um... yes, that was me. Thanks anyway, I've already fixed it.
>
> Check the placement again. It's *not* in the right place.
>
>
>
> One way to visualize what's happening is to look at the detail with an
> orthographic camera, and to add a visible copy of the suspect difference
> to the scene
>
> E.g. temporarily change your camera to
>
> camera {location <6,-4,0>
> look_at <6,-4,10>
> orthographic
> }
>
> And temporarily add this at the very end of the scene
>
> difference {
> box{<4,-2,18>,<7,-5,-18>}
> cylinder{<7,-5,19>,<7,-5,-19> 2}
> pigment {rgb x}
> translate <0,0,50>
> }
>
> When you render that, you'll see that the suspect bit touches the main
> object in two places. You really don't want the one around <4,-5,*>, and
> the one around <7,-3,*> doesn't do very much.
>
> I reckon that the correct shape is more like
>
> difference {
> box{<4,-2,18>,<7.5,-4,-18>}
> cylinder{<7.5,-5,19>,<7.5,-5,-19> 2}
> }
At the moment I've got it at
difference {
box{<4,-1,18>,<7.5,-4.1,-18>}
cylinder{<7.5,-5,19>,<7.5,-5,-19> 2 }
}
I'll see if -4 in the box works better than the -4.1 I've got at the moment, but
it's looking good now.
I also need to brush up on my trig (it's been about 12 years since I touched the
subject). If I had worked it all out with trig I guess I wouldn't have had these
problems.
Thanks Mike,
--
/* Nekar Xenos */#local N=<-20,40,100>;#local K=<20,-40,100>;#local R=seed(0);
blob{#while((K-N).x>0)#local X=N;#local N=N+<rand(R),rand(R),1>/3;#local N=(
vlength(N-K)<vlength(X-K)?N:2*X-N);sphere{<N.y,-N.x,N.z>,1,1 scale .02}sphere{N
,1,1 scale.02}sphere{<-N.x-40,N.y,N.z>1,1 scale.01}sphere{<N.x+40,-N.y,N.z>1,1
scale.01 }#end pigment{rgbt 1}interior{media{emission <2,4,5>*5}}hollow}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |