POV-Ray : Newsgroups : povray.advanced-users : Ok, seriously, I need help here.. Server Time
5 Jul 2024 15:27:14 EDT (-0400)
  Ok, seriously, I need help here.. (Message 11 to 20 of 23)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
From: Jaap Frank
Subject: Re: Ok, seriously, I need help here..
Date: 2 Mar 2008 19:02:17
Message: <47cb4009$1@news.povray.org>
"Jan Dvorak" <jan### [at] centrumcz> schreef in bericht 
news:47cb13c8$1@news.povray.org...
> Warp napsal(a):
>> Jaap Frank <jjf### [at] casemanl> wrote:
>>> Because triangles are not solid objects but surfaces only, you can't 
>>> carve something out of it.
>>
>>   No primitive in POV-Ray is solid. Everything is just a surface.
>>
>>   What "solid" means in terms of CSG is that some points can be defined
>> to be "outside" the surface and others "inside" it. Thus "closed surface"
>> would be a much more accurate term than "solid".
>>
>>   The problem with eg. the triangle primitive is that it's not a closed
>> surface, but on open one. Thus it can't have a defined interior (ie. 
>> there
>> aren't points which can be said to be "inside" a triangle).
>>
>>   OTOH, a closed triangle mesh can be defined as being "solid" because
>> POV-Ray can determine whether a point is inside this closed mesh or not.
>> This can be done by using the inside_vector feature of meshes.
>>
> well, umm, thanks. And remember the sun doesn't move. But that doesn't 
> stop us from saying it does. I often say the sun has moved behind the even 
> though there is no such thing as a horizon and the doesn't move at all 
> (well, it does). It is because the result is the same (up to some feeble 
> effects).
>
> By saying "a sphere is solid" i imply "with respect to the context" and I 
> mean "a sphere behaves just like it was solid" i.e. "you can do CSG with 
> spheres". (actually, the sphere *doesn't* behave, it has no brain).
> What I'm trying to say, people often describe what do objects do 
> (interface) rather than how do they do it (implementation).
>
> Your comment would be appropriate as a response to someone claiming the 
> raytracer considers the whole object interior when raytracing it. IMO your 
> comment is inappropriate here I don't mean to be rude, I simply find it 
> strange that you defend something that's not being denied. If not 
> inappropriate, your comment is not very hepful (neither is mine, I admit)
>
> -- 
> You know you've been raytracing too long when...
> you ever saw a beautiful scenerey and regretted not to take your 6" 
> reflective ball and a digital camera, thinking "this would have been a 
> perfect light probe"
> -Johnny D

What Warp means, I think, is that you can make a 'solid' octahedron
by placing eight triangles between the points
<1,0,0>,<-1,0,0>,<0,1,0>,<0,-1,0>,<0,0,1>,<0,0,-1>.
It's a closed object, so you now can treat it as a 'solid', given an inside
vector. You can use this object in CSG. I hadn't thought about that.

Nevertheless Patrick wants rounded edges, so there is some more work to do.
Maybe he can start with this object and figure out how deep he has to cut
off the rims and points to put his spheres and cylinders for the rounded
edges. That's not easy, for this has to be so deep that the newly formed
stripes have precisely the right width.
At the moment I don't see how to calculate this.

Patrick,
I think you forgot that prisms are made along the Y-axis and you
define the points in the X-Z-plane. Later you have to rotate the prism.
If you use your selfmade rounded triangle eight times, then all edges are
double and all angelar points are quadruple so you get coincident surfaces
and weird errors in your surfaces.
I think the best way is to make eight different rounded triangles the
way you did and omit the parts that are not needed: make a drawing of
the beast and put it then together.

Maybe you can use conic_sweep to make pyramids with a summit that
will meet all other pyramids in the center of the octahedron, but I'm not
sure about this, for I have never used conic_sweep before and the
manual is not clear about this.
If you make a 3D-drawing with the points I gave, you will see what I
mean (I hope :) ).

Success,

Jaap


Post a reply to this message

From: Jan Dvorak
Subject: Re: Ok, seriously, I need help here..
Date: 2 Mar 2008 19:08:17
Message: <47cb4171$1@news.povray.org>
Patrick Elliott napsal(a):
> Decided to rework the design of the octahedron, so that it *should* 
> allow me to do this:
> 
> #declare octoside = {blah}
> 
> union {
>   object {octoside
>           rotate <0,90,0>}
>   ...
> }
> 
> and get the result I want. The problem is, this is as far as I got:
> 
> camera{
>         orthographic
>         location <0,sqrt(2)/2,-3> look_at <0,sqrt(2)/2,0> angle 60
>         right x up y
> }
> 
> light_source{<5,5,-10>,1.5}
> 
> //intersection {
>   union {
>     sphere {<-1,0,0>,0.075}
>     sphere {<1,0,0>,0.075}
>     sphere {<0,sqrt(2),0>,0.075}
>     cylinder {<-1,0,0>,<1,0,0>,0.075}
>     cylinder {<0,sqrt(2),0>,<1,0,0>,0.075}
>     cylinder {<-1,0,0>,<0,sqrt(2),0>,0.075}
>     texture {
>       pigment {rgb <1,1,1>}
>     }
>     //triangle {<-1,0,-0.075>,<0,sqrt(2),-0.075>,<1,0,-0.075>}
>     //triangle {<-1,0,0.075>,<0,sqrt(2),0.075>,<1,0,0.075>}
>   //rotate <45,0,0> <- test purposes, move to last statement in final 
> object, with translate.
>   //translate <0,0,-1>
>   }
> //  box {<-1,0,-0.075>,<1,sqrt(2),0.075>}
> //
> //}
> 
> Neeless to say, since the original used intersection, I took a chance on 
> that working. It didn't. The **best** solution would be if I could tie 
> triangles to the center points and weld them to the main object, to 
> produce a solid, or at least one solid enough to cut sections out of and 
> have material left behind, instead of a hollow shell with a hole in it. 
> It only get worse if I want to late make a crystal version, or some 
> other such thing, where the entire inside has to be solid, instead of it 
> being hollow. There has got to be some means I can fill in the sides, 
> like I want, and also the rest of the interior of the final object. I am 
> just not seeing it at the moment. And, if its something blindingly 
> obvious, like using triangles some how, then I can even set the exact 
> points I want, instead of using the 45 degree angle trick and computing 
> the sqrt(2) length for the side being rotated into place. Can't imaging 
> why I didn't try something like this before... lol Might have been 
> easier to model this bloody thing as a patch.
> 
When I think about it now, wouldn't it be possible to use a superellipsoid?

-- 
You know you've been raytracing too long when...
you ever saw a beautiful scenerey and regretted not to take your 6" 
reflective ball and a digital camera, thinking "this would have been a 
perfect light probe"
-Johnny D


Post a reply to this message

From: Tim Attwood
Subject: Re: Ok, seriously, I need help here..
Date: 2 Mar 2008 21:17:10
Message: <47cb5fa6$1@news.povray.org>
The center's a bit off, but this should work if
you don't cut it too deep.

#local A = <-1,0,0>;
#local B = <1,0,0>;
#local C = <0,sqrt(2),0>;
#local D = <0,0,1>;
#local RAD = 0.075;

#declare tetra = mesh {
   triangle {A,B,C}
   triangle {B,C,D}
   triangle {C,D,A}
   triangle {D,A,B}
   inside_vector (A+B+C+D)/4
   translate <0,0,-RAD>
}

#declare octaside = union {
    sphere {A,RAD}
    sphere {B,RAD}
    sphere {C,RAD}
    cylinder {A,B,RAD}
    cylinder {C,B,RAD}
    cylinder {A,C,RAD}
    object{tetra}
    rotate <45,0,0>
    translate <0,0,-1>
};

#declare pyramid = union {
   object {octaside}
   object {octaside rotate <0,90,0>}
   object {octaside rotate <0,180,0>}
   object {octaside rotate <0,270,0>}
};

#declare octagon = union {
   object {pyramid}
   object {pyramid rotate <180,0,0>}
};


Post a reply to this message

From: Alain
Subject: Re: Ok, seriously, I need help here..
Date: 3 Mar 2008 14:01:20
Message: <47cc4b00$1@news.povray.org>
Tim Attwood nous apporta ses lumieres en ce 2008/03/02 21:17:
> The center's a bit off, but this should work if
> you don't cut it too deep.
> 
> #local A = <-1,0,0>;
> #local B = <1,0,0>;
> #local C = <0,sqrt(2),0>;
> #local D = <0,0,1>;
> #local RAD = 0.075;
> 
> #declare tetra = mesh {
>    triangle {A,B,C}
>    triangle {B,C,D}
>    triangle {C,D,A}
>    triangle {D,A,B}
>    inside_vector (A+B+C+D)/4
>    translate <0,0,-RAD>
> }
> 
> #declare octaside = union {
>     sphere {A,RAD}
>     sphere {B,RAD}
>     sphere {C,RAD}
>     cylinder {A,B,RAD}
>     cylinder {C,B,RAD}
>     cylinder {A,C,RAD}
>     object{tetra}
>     rotate <45,0,0>
>     translate <0,0,-1>
> };
> 
> #declare pyramid = union {
>    object {octaside}
>    object {octaside rotate <0,90,0>}
>    object {octaside rotate <0,180,0>}
>    object {octaside rotate <0,270,0>}
> };
> 
> #declare octagon = union {
>    object {pyramid}
>    object {pyramid rotate <180,0,0>}
> };
> 
> 
Your octaedron is flatened verticaly. When viewed along an axis passing by two 
oposing summits, it should look square. As it is now, the projection will change 
depending on what pair of summits you chose.
Rotate is 45 degree around the Y axis, and all angles of the resultins image 
should be square angles. (I have the "real", solid, thing in my hand)

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you read about an algorithm or 
datastructure and your first thought is: "How can I use this to speed up 
raytracing?"
Christoph Rieder


Post a reply to this message

From: Alain
Subject: Re: Ok, seriously, I need help here..
Date: 3 Mar 2008 15:50:26
Message: <47cc6492$1@news.povray.org>
Jan Dvorak nous apporta ses lumieres en ce 2008/03/02 19:07:
> Patrick Elliott napsal(a):
>> Decided to rework the design of the octahedron, so that it *should* 
>> allow me to do this:
>>
>> #declare octoside = {blah}
>>
>> union {
>>   object {octoside
>>           rotate <0,90,0>}
>>   ...
>> }
>>
>> and get the result I want. The problem is, this is as far as I got:
>>
>> camera{
>>         orthographic
>>         location <0,sqrt(2)/2,-3> look_at <0,sqrt(2)/2,0> angle 60
>>         right x up y
>> }
>>
>> light_source{<5,5,-10>,1.5}
>>
>> //intersection {
>>   union {
>>     sphere {<-1,0,0>,0.075}
>>     sphere {<1,0,0>,0.075}
>>     sphere {<0,sqrt(2),0>,0.075}
>>     cylinder {<-1,0,0>,<1,0,0>,0.075}
>>     cylinder {<0,sqrt(2),0>,<1,0,0>,0.075}
>>     cylinder {<-1,0,0>,<0,sqrt(2),0>,0.075}
>>     texture {
>>       pigment {rgb <1,1,1>}
>>     }
>>     //triangle {<-1,0,-0.075>,<0,sqrt(2),-0.075>,<1,0,-0.075>}
>>     //triangle {<-1,0,0.075>,<0,sqrt(2),0.075>,<1,0,0.075>}
>>   //rotate <45,0,0> <- test purposes, move to last statement in final 
>> object, with translate.
>>   //translate <0,0,-1>
>>   }
>> //  box {<-1,0,-0.075>,<1,sqrt(2),0.075>}
>> //
>> //}
>>
>> Neeless to say, since the original used intersection, I took a chance 
>> on that working. It didn't. The **best** solution would be if I could 
>> tie triangles to the center points and weld them to the main object, 
>> to produce a solid, or at least one solid enough to cut sections out 
>> of and have material left behind, instead of a hollow shell with a 
>> hole in it. It only get worse if I want to late make a crystal 
>> version, or some other such thing, where the entire inside has to be 
>> solid, instead of it being hollow. There has got to be some means I 
>> can fill in the sides, like I want, and also the rest of the interior 
>> of the final object. I am just not seeing it at the moment. And, if 
>> its something blindingly obvious, like using triangles some how, then 
>> I can even set the exact points I want, instead of using the 45 degree 
>> angle trick and computing the sqrt(2) length for the side being 
>> rotated into place. Can't imaging why I didn't try something like this 
>> before... lol Might have been easier to model this bloody thing as a 
>> patch.
>>
> When I think about it now, wouldn't it be possible to use a superellipsoid?
> 
superellipsoid{<2,2>} give you an octaedron. Smaler values make the faces curve 
out, while the edges stay sharp. Larger values make the faces cave in.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you read about an algorithm or 
datastructure and your first thought is: "How can I use this to speed up 
raytracing?"
Christoph Rieder


Post a reply to this message

From: Patrick Elliott
Subject: Re: Ok, seriously, I need help here..
Date: 3 Mar 2008 20:02:54
Message: <MPG.22364d833c799f3198a112@news.povray.org>
In article <47cb160a$1@news.povray.org>, jan### [at] centrumcz says...
> 
> > I really wish there was a built in way to define, or at least convert,
 
> > boxes into the same format as cylinders though, i.e.:
> > 
> > altbox {<endpoint1>,<endpoint2>,base_width}
> > 
> You can use Reorient_Trans() from transforms.inc and VDist() from 
> math.inc to align the box and a vector average (p1+p2)/2 to position it.
 
> Not that tough.
> 
Huh? lol

I will take your word for it.

-- 
void main () {

    if version = "Vista" {
      call slow_by_half();
      call DRM_everything();
    }
    call functional_code();
  }
  else
    call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

From: Patrick Elliott
Subject: Re: Ok, seriously, I need help here..
Date: 3 Mar 2008 20:20:36
Message: <MPG.223651d17489b8e298a113@news.povray.org>
In article <47cb5fa6$1@news.povray.org>, tim### [at] comcastnet says...
> The center's a bit off, but this should work if
> you don't cut it too deep.
> 
> #local A = <-1,0,0>;
> #local B = <1,0,0>;
> #local C = <0,sqrt(2),0>;
> #local D = <0,0,1>;
> #local RAD = 0.075;
> 
> #declare tetra = mesh {
>    triangle {A,B,C}
>    triangle {B,C,D}
>    triangle {C,D,A}
>    triangle {D,A,B}
>    inside_vector (A+B+C+D)/4
>    translate <0,0,-RAD>
> }
> 
> #declare octaside = union {
>     sphere {A,RAD}
>     sphere {B,RAD}
>     sphere {C,RAD}
>     cylinder {A,B,RAD}
>     cylinder {C,B,RAD}
>     cylinder {A,C,RAD}
>     object{tetra}
>     rotate <45,0,0>
>     translate <0,0,-1>
> };
> 
> #declare pyramid = union {
>    object {octaside}
>    object {octaside rotate <0,90,0>}
>    object {octaside rotate <0,180,0>}
>    object {octaside rotate <0,270,0>}
> };
> 
> #declare octagon = union {
>    object {pyramid}
>    object {pyramid rotate <180,0,0>}
> };
> 
Strictly speaking, the last version I posted was intended to be 100% 
solid, with ior for crystal. The version works fine, as a solid color, 
where I only plan to cut into the surface a bit to leave behind color. 
I.e., when I don't need 100% of it to be solid. The problem here is, I 
am not sure the result is what it *should* look like for a solid 
crystal. I threw together the scene rather quickly, so I don't know if 
the odd streaking is a result of the shape, the simple scene, or 
mistakes in my merges. :(

-- 
void main () {

    if version = "Vista" {
      call slow_by_half();
      call DRM_everything();
    }
    call functional_code();
  }
  else
    call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

From: Alain
Subject: Re: Ok, seriously, I need help here..
Date: 3 Mar 2008 21:20:56
Message: <47ccb208$1@news.povray.org>
Patrick Elliott nous apporta ses lumieres en ce 2008/03/03 20:20:
> In article <47cb5fa6$1@news.povray.org>, tim### [at] comcastnet says...
>> The center's a bit off, but this should work if
>> you don't cut it too deep.
>>
>> #local A = <-1,0,0>;
>> #local B = <1,0,0>;
>> #local C = <0,sqrt(2),0>;
>> #local D = <0,0,1>;
>> #local RAD = 0.075;
>>
>> #declare tetra = mesh {
>>    triangle {A,B,C}
>>    triangle {B,C,D}
>>    triangle {C,D,A}
>>    triangle {D,A,B}
>>    inside_vector (A+B+C+D)/4
>>    translate <0,0,-RAD>
>> }
>>
>> #declare octaside = union {
>>     sphere {A,RAD}
>>     sphere {B,RAD}
>>     sphere {C,RAD}
>>     cylinder {A,B,RAD}
>>     cylinder {C,B,RAD}
>>     cylinder {A,C,RAD}
>>     object{tetra}
>>     rotate <45,0,0>
>>     translate <0,0,-1>
>> };
>>
>> #declare pyramid = union {
>>    object {octaside}
>>    object {octaside rotate <0,90,0>}
>>    object {octaside rotate <0,180,0>}
>>    object {octaside rotate <0,270,0>}
>> };
>>
>> #declare octagon = union {
>>    object {pyramid}
>>    object {pyramid rotate <180,0,0>}
>> };
>>
> Strictly speaking, the last version I posted was intended to be 100% 
> solid, with ior for crystal. The version works fine, as a solid color, 
> where I only plan to cut into the surface a bit to leave behind color. 
> I.e., when I don't need 100% of it to be solid. The problem here is, I 
> am not sure the result is what it *should* look like for a solid 
> crystal. I threw together the scene rather quickly, so I don't know if 
> the odd streaking is a result of the shape, the simple scene, or 
> mistakes in my merges. :(
> 
It contain an inner cavity. The top and bottom meshes intersect. The 4 meshes of 
the top never meet, creating a large cross shaped opening. If you want a 
transparent octaedron, you must fill that, in addition to using merge.

If you look at the way I proposed (intersection of planes), you'll see that 
there are no iner opening.
#declare SQ = sqrt(2);
#declare Octabase =//create the base solid octaedron
	intersection{plane{<0,1,SQ>,1
		plane{<0,1,SQ>,1 }
		plane{<0,1,SQ>,1 }
		plane{<0,1,SQ>,1 }
		plane{<0,-1,SQ>,1}
		plane{<0,-1,SQ>,1 rotate<0,90,0>}
		plane{<0,-1,SQ>,1 rotate<0,180,0>}
		plane{<0,-1,SQ>,1 rotate<0,270,0>}
		}

#local Cut = SQ; //adjust for larger or smaller flatening of edges
#declare CutOctaedron =
	intersection{
		object{Octabase}// each of the next 3 box cut 4 edges
		box{<Cut,2,Cut>,<-Cut,-2,-Cut>}
		box{<2,Cut,Cut>,<-2,-Cut,-Cut>rotate<45,45,0>}
		box{<2,Cut,Cut>,<-2,-Cut,-Cut>rotate<-45,-45,0>}
		box{Cut, -Cut rotate 45*y}//to cut the remaining tips
		//last box is optional
		}

-- 
Alain
-------------------------------------------------
Moonies: Only really happy shit happens.


Post a reply to this message

From: Tim Attwood
Subject: Re: Ok, seriously, I need help here..
Date: 4 Mar 2008 04:52:05
Message: <47cd1bc5$1@news.povray.org>
Here's a macro that should work better.

#macro Rounded_Octahedron(Major, Minor, MRG)
   #local Top = <0,Major,0>;
   #local Bot = <0,-Major,0>;
   #local LF  = <-0.7071*Major,0,-0.7071*Major>;
   #local LR  = <-0.7071*Major,0,0.7071*Major>;
   #local RF  = <0.7071*Major,0,-0.7071*Major>;
   #local RR  = <0.7071*Major,0,0.7071*Major>;
   #local A = 35.26413;
   #local B = vrotate(<0,0,-Minor>,<A,0,0>);
   #local C = vrotate(<-Minor,0,0>,<0,0,-A>);
   #local D = vrotate(<0,0,Minor>,<-A,0,0>);
   #local E = vrotate(<Minor,0,0>,<0,0,A>);
   #local B2 = <B.x,-B.y,B.z>;
   #local C2 = <C.x,-C.y,C.z>;
   #local D2 = <D.x,-D.y,D.z>;
   #local E2 = <E.x,-E.y,E.z>;
   #if (MRG) merge{ #else union{ #end
      mesh {
         // faces
         triangle {Top+B,RF+B,LF+B}
         triangle {Top+C,LF+C,LR+C}
         triangle {Top+D,LR+D,RR+D}
         triangle {Top+E,RR+E,RF+E}
         triangle {Bot+B2,RF+B2,LF+B2}
         triangle {Bot+C2,LF+C2,LR+C2}
         triangle {Bot+D2,LR+D2,RR+D2}
         triangle {Bot+E2,RR+E2,RF+E2}
         // peaks
         triangle {Top+B,Top+C,Top+D}
         triangle {Top+B,Top+E,Top+D}
         triangle {Bot+B2,Bot+C2,Bot+D2}
         triangle {Bot+B2,Bot+E2,Bot+D2}
         triangle {LF+B,LF+C,LF+C2}
         triangle {LF+B,LF+B2,LF+C2}
         triangle {LR+C,LR+D,LR+D2}
         triangle {LR+C,LR+C2,LR+D2}
         triangle {RF+B,RF+E,RF+E2}
         triangle {RF+B,RF+B2,RF+E2}
         triangle {RR+D,RR+E,RR+E2}
         triangle {RR+D,RR+D2,RR+E2}
         // edges
         triangle {LF+B,RF+B,RF+B2}
         triangle {LF+B,LF+B2,RF+B2}
         triangle {LF+C,LR+C,LR+C2}
         triangle {LF+C,LF+C2,LR+C2}
         triangle {LR+D,RR+D,RR+D2}
         triangle {LR+D,LR+D2,RR+D2}
         triangle {RF+E,RR+E,RR+E2}
         triangle {RF+E,RF+E2,RR+E2}
         triangle {Top+B,Top+C,LF+C}
         triangle {Top+B,LF +B,LF+C}
         triangle {Top+B,Top+E,RF+E}
         triangle {Top+B,RF +B,RF+E}
         triangle {Top+D,Top+C,LR+C}
         triangle {Top+D,LR +D,LR+C}
         triangle {Top+D,Top+E,RR+E}
         triangle {Top+D,RR +D,RR+E}
         triangle {Bot+B2,Bot+C2,LF+C2}
         triangle {Bot+B2,LF +B2,LF+C2}
         triangle {Bot+B2,Bot+E2,RF+E2}
         triangle {Bot+B2,RF +B2,RF+E2}
         triangle {Bot+D2,Bot+C2,LR+C2}
         triangle {Bot+D2,LR +D2,LR+C2}
         triangle {Bot+D2,Bot+E2,RR+E2}
         triangle {Bot+D2,RR +D2,RR+E2}
         inside_vector <0,Minor,0>
      }
      sphere {Top,Minor}
      sphere {Bot,Minor}
      sphere {LF,Minor}
      sphere {LR,Minor}
      sphere {RF,Minor}
      sphere {RR,Minor}
      cylinder{Top,LF,Minor}
      cylinder{Top,LR,Minor}
      cylinder{Top,RF,Minor}
      cylinder{Top,RR,Minor}
      cylinder{Bot,LF,Minor}
      cylinder{Bot,LR,Minor}
      cylinder{Bot,RF,Minor}
      cylinder{Bot,RR,Minor}
      cylinder{RF,RR ,Minor}
      cylinder{LF,LR ,Minor}
      cylinder{RF,LF ,Minor}
      cylinder{RR,LR ,Minor}
   }
#end


Post a reply to this message

From: Patrick Elliott
Subject: Re: Ok, seriously, I need help here..
Date: 4 Mar 2008 13:36:08
Message: <MPG.2237445cbaa1418798a114@news.povray.org>
In article <47ccb208$1@news.povray.org>, ele### [at] netscapenet 
says...
> Patrick Elliott nous apporta ses lumieres en ce 2008/03/03 20:20:
> > In article <47cb5fa6$1@news.povray.org>, tim### [at] comcastnet says...
> >> The center's a bit off, but this should work if
> >> you don't cut it too deep.
> >>
> >> #local A = <-1,0,0>;
> >> #local B = <1,0,0>;
> >> #local C = <0,sqrt(2),0>;
> >> #local D = <0,0,1>;
> >> #local RAD = 0.075;
> >>
> >> #declare tetra = mesh {
> >>    triangle {A,B,C}
> >>    triangle {B,C,D}
> >>    triangle {C,D,A}
> >>    triangle {D,A,B}
> >>    inside_vector (A+B+C+D)/4
> >>    translate <0,0,-RAD>
> >> }
> >>
> >> #declare octaside = union {
> >>     sphere {A,RAD}
> >>     sphere {B,RAD}
> >>     sphere {C,RAD}
> >>     cylinder {A,B,RAD}
> >>     cylinder {C,B,RAD}
> >>     cylinder {A,C,RAD}
> >>     object{tetra}
> >>     rotate <45,0,0>
> >>     translate <0,0,-1>
> >> };
> >>
> >> #declare pyramid = union {
> >>    object {octaside}
> >>    object {octaside rotate <0,90,0>}
> >>    object {octaside rotate <0,180,0>}
> >>    object {octaside rotate <0,270,0>}
> >> };
> >>
> >> #declare octagon = union {
> >>    object {pyramid}
> >>    object {pyramid rotate <180,0,0>}
> >> };
> >>
> > Strictly speaking, the last version I posted was intended to be 100% 
> > solid, with ior for crystal. The version works fine, as a solid color,
 
> > where I only plan to cut into the surface a bit to leave behind color.
 
> > I.e., when I don't need 100% of it to be solid. The problem here is, I
 
> > am not sure the result is what it *should* look like for a solid 
> > crystal. I threw together the scene rather quickly, so I don't know if
 
> > the odd streaking is a result of the shape, the simple scene, or 
> > mistakes in my merges. :(
> > 
> It contain an inner cavity. The top and bottom meshes intersect. The 4 me
shes of 
> the top never meet, creating a large cross shaped opening. If you want a
 
> transparent octaedron, you must fill that, in addition to using merge.
> 
> If you look at the way I proposed (intersection of planes), you'll see th
at 
> there are no iner opening.
> #declare SQ = sqrt(2);
> #declare Octabase =//create the base solid octaedron
> 	intersection{plane{<0,1,SQ>,1
> 		plane{<0,1,SQ>,1 }
> 		plane{<0,1,SQ>,1 }
> 		plane{<0,1,SQ>,1 }
> 		plane{<0,-1,SQ>,1}
> 		plane{<0,-1,SQ>,1 rotate<0,90,0>}
> 		plane{<0,-1,SQ>,1 rotate<0,180,0>}
> 		plane{<0,-1,SQ>,1 rotate<0,270,0>}
> 		}
> 
> #local Cut = SQ; //adjust for larger or smaller flatening of edges
> #declare CutOctaedron =
> 	intersection{
> 		object{Octabase}// each of the next 3 box cut 4 edges
> 		box{<Cut,2,Cut>,<-Cut,-2,-Cut>}
> 		box{<2,Cut,Cut>,<-2,-Cut,-Cut>rotate<45,45,0>}
> 		box{<2,Cut,Cut>,<-2,-Cut,-Cut>rotate<-45,-45,0>}
> 		box{Cut, -Cut rotate 45*y}//to cut the remaining tips
> 		//last box is optional
> 		}
> 
Was about to start looking at how to do cuts instead. Thanks. Tim also 
has one that might be interesting too. I had figured I might have gaps, 
but I sliced it open with a cross section while resizing the central 
part, so that it would overlap the fills I had already done. I guess I 
missed something some place. lol I think we can say that rounding 
"some" objects is less than trivial. lol

-- 
void main () {

    if version = "Vista" {
      call slow_by_half();
      call DRM_everything();
    }
    call functional_code();
  }
  else
    call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>

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