|
|
Bob Hughes wrote:
>
> Rather than try and make guesses I just tried to make such a thing myself
> and I couldn't even see any reversed (or whatever) reflection:
First: Thank you very much for trying to help me!
I'm quite frustrated, because I need the reflections from this
middle "cigar" shape to behave correctly(?) in other scenes.
I have now included some of my source code below so that you can see
what I'm actually doing.
Note that my convex "cigar" shape is made with a torus that has a
greater minor radius than major radius.
And I now wonder if this could cause the odd change in reflections?
(As I understand from your code, you are making a similar shape by
scaling a sphere along an axis.)
Regards
Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version 3.1;
#include "colors.inc"
#include "textures.inc"
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare v3Origo = <0, 0, 0>;
#macro Pythagoras(hyp, kat)
sqrt(hyp*hyp - kat*kat)
#end // macro Pythagoras
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare RadW = 1.0; // Max Radius for Wide part (Cigar Shape)
#declare RadN = 0.5; // Min Radius for Narrow part (Spoke shape)
#declare RadMinC = 26; // Minor Radius for Cigar shape
#declare RadMinS = 26; // Minor Radius for Spoke shape
#declare HoleClearing = 0.1;
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare RadMajC = RadMinC - RadW; // Major Radius for Cigar shape
#declare RadMajS = RadMinS + RadN; // Major Radius for Spoke shape
#declare ss = Pythagoras(RadMinC + RadMinS, RadMajC + RadMajS);
#declare tt = ss*RadMinS/(RadMinC + RadMinS);
#declare DistBetween = 2*ss; // RadW + RadN
#declare Cigar =
difference {
sphere { v3Origo, Pythagoras(RadMinC, RadMajC) }
torus { RadMajC, RadMinC }
cylinder { (RadW + RadN)*x, -(RadW + RadN)*x, RadN + HoleClearing }
// plane { y, tt - ss }
// plane { -y, tt - ss }
}
#declare Spoke =
difference {
sphere { v3Origo, vlength(<RadMajS, RadMinS>) }
torus { RadMajS, RadMinS }
plane { y, -tt }
plane { -y, -tt }
}
//#declare SpkCig =
merge {
object { Cigar translate +ss/2*y }
object { Spoke translate -ss/2*y }
texture { Soft_Silver }
pigment { color Red }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
|