|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am working on a model of a .223 Caliber bullet, when I use 1 povunit =
1 inch I get a weird 'squatty' bullet. If I scale by <1,2,1> it looks
'right' why would I not get a correctly porpotioned image without
scaling it? the image source below will generate 2 objects, left is
using actual measurements the right is scaled.
Source code:
#version 3.1
#include "metals.inc"
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
camera
{
location <0.0, 1, -9>
direction 1.0*z
right 4/3*x
look_at <0.0, 1, 0.0>
}
light_source
{
<-30, 30, -30>
color red 1.0 green 1.0 blue 1.0
}
#declare A223Round =
union{
union{
difference {
cylinder { .001*y, .260*y .363}
cylinder { 0*y, .260*y .169}
}
lathe {
linear_spline 10,
<.373, 0>, <.373, .041>, <.325, .042>, <.327,.060>, <.372,.11>,
<.349, 1.436>, <.248,1.58>, <.248,1.76>, <.247, 1.76>, <.247, 1.58>
}
texture{T_Brass_4B}
}
lathe {
linear_spline 7,
<.222, 0>, <.222, .263>, <.223, .264>, <.17,.40>, <.06,.61>, <.02,
.6>, < 0,.5>
texture{T_Copper_2B}
translate <0,1.65,0>
}
}
object {A223Round translate <-1,0,0>}
object {A223Round translate <1,0,0> scale <1,2,1>}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mark Palmquist wrote:
>
> I am working on a model of a .223 Caliber bullet, when I use 1 povunit =
> 1 inch I get a weird 'squatty' bullet. If I scale by <1,2,1> it looks
> 'right' why would I not get a correctly porpotioned image without
> scaling it? the image source below will generate 2 objects, left is
> using actual measurements the right is scaled.
A look at the results and then a look at the lathe objects revealed
your scaling problem. The aspect ratio you choose for width vs. height
was off a factor 2:1. I basicaly increased the numbers in the right column
by twice their value for added height and adjusted the translation of the
projectile and it came a lot closer to what it should look like. This
was all quick shot in the dark changes and you will need to correct
a couple of niggly little steps I left in the code below before it will
look good.
Sorry about the non indented script. I Can Not read a lathe or any other type
of multi point object withouth having it in columns. It adds clarity
to my perseption.
lathe {
linear_spline
10,
<0.373, 0.000>,
<0.373, 0.081>,
<0.325, 0.082>,
<0.327, 0.120>,
<0.372, 0.220>,
<0.349, 2.436>,
<0.248, 2.580>,
<0.248, 2.760>,
<0.247, 2.760>,
<0.247, 2.580>}
texture{T_Brass_4B}}
lathe {
linear_spline
7,
<0.222, 0.000>,
<0.222, 0.463>,
<0.223, 0.464>,
<0.170, 0.800>,
<0.060, 1.210>,
<0.020, 1.200>,
<0.000, 1.200>
texture{T_Copper_2B}
translate<0,2.75,0>}}
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote in message <36D00DBC.E705B34D@pacbell.net>...
> Sorry about the non indented script. I Can Not read a lathe or any other
type
>of multi point object withouth having it in columns. It adds clarity
>to my perseption.
And indentation doesn't?! Ahh, forget it...
Margus
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Margus Ramst wrote:
>
> Ken wrote in message <36D00DBC.E705B34D@pacbell.net>...
>
> > Sorry about the non indented script. I Can Not read a lathe or any other
> type
> >of multi point object withouth having it in columns. It adds clarity
> >to my perseption.
>
> And indentation doesn't?! Ahh, forget it...
>
> Margus
Do you honestly think that Mark's format for the lathe is easier to read,
and visualize it's form, than the lathe format I provided ?
Ahh, forget it...
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken schrieb in Nachricht <36D00DBC.E705B34D@pacbell.net>...
> Sorry about the non indented script. I Can Not read a lathe or any other
type
>of multi point object withouth having it in columns. It adds clarity
>to my perseption.
Now you were sooo close to make it really readable:
lathe {
linear_spline
10,
<0.373, 0.000>,
<0.373, 0.081>,
<0.325, 0.082>,
<0.327, 0.120>,
<0.372, 0.220>,
<0.349, 2.436>,
<0.248, 2.580>,
<0.248, 2.760>,
<0.247, 2.760>,
<0.247, 2.580>
texture { T_Brass_4B }
}
lathe {
linear_spline
7,
<0.222, 0.000>,
<0.222, 0.463>,
<0.223, 0.464>,
<0.170, 0.800>,
<0.060, 1.210>,
<0.020, 1.200>,
<0.000, 1.200>
texture { T_Copper_2B }
translate<0,2.75,0>
}
Indentation is only there to show you the levels of a hierarchy, like in the
left pane of the Windows Explorer, ahhh... forget it.
--
Rudy
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alright, the lathe format looks better. But the rest of the code would still
be difficult to read without indentation (IMHO, at least).
Just as an example: my fur-generator's sampling script has
loops/conditionals nested 5 levels deep. I shudder to think what it would
look like without indentation...
Anyway, let's drop it.
Margus
Ken wrote in message <36D017FC.470AE070@pacbell.net>...
>Do you honestly think that Mark's format for the lathe is easier to read,
>and visualize it's form, than the lathe format I provided ?
>
>Ahh, forget it...
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken,
I have to agree that the lathe object definitly looks better on columns! thanks
for the hint. I will still indent most code but the coordinates will be in
columns.:)
My problem is I used ACTUAL measurements of a round sitting here at the computer
with a dial caliper. why do I need to double the height values? shouldn't the
lathe take real numbers and render a 'real' looking object?
Ken wrote:
> Mark Palmquist wrote:
> >
> > I am working on a model of a .223 Caliber bullet, when I use 1 povunit =
> > 1 inch I get a weird 'squatty' bullet. If I scale by <1,2,1> it looks
> > 'right' why would I not get a correctly porpotioned image without
> > scaling it? the image source below will generate 2 objects, left is
> > using actual measurements the right is scaled.
>
> A look at the results and then a look at the lathe objects revealed
> your scaling problem. The aspect ratio you choose for width vs. height
> was off a factor 2:1. I basicaly increased the numbers in the right column
> by twice their value for added height and adjusted the translation of the
> projectile and it came a lot closer to what it should look like. This
> was all quick shot in the dark changes and you will need to correct
> a couple of niggly little steps I left in the code below before it will
> look good.
>
> Sorry about the non indented script. I Can Not read a lathe or any other type
> of multi point object withouth having it in columns. It adds clarity
> to my perseption.
>
> lathe {
> linear_spline
> 10,
> <0.373, 0.000>,
> <0.373, 0.081>,
> <0.325, 0.082>,
> <0.327, 0.120>,
> <0.372, 0.220>,
> <0.349, 2.436>,
> <0.248, 2.580>,
> <0.248, 2.760>,
> <0.247, 2.760>,
> <0.247, 2.580>}
> texture{T_Brass_4B}}
>
> lathe {
> linear_spline
> 7,
> <0.222, 0.000>,
> <0.222, 0.463>,
> <0.223, 0.464>,
> <0.170, 0.800>,
> <0.060, 1.210>,
> <0.020, 1.200>,
> <0.000, 1.200>
> texture{T_Copper_2B}
> translate<0,2.75,0>}}
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When I run into trouble like that, instead of fudging and running into worse
troubles later, I would make a sphere, usually bright red or green, and see
how it looks. In fact, in most of my scenes I have a section
#if (WantTestObjects)
sphere { <-5, -10, 0>, .5 pigment {<1,.3,.3>} finish{ambient.5 diffuse .5}}
...etc....spheres....cylinders....etc....
#endif
These test objects have high ambient values to make them show unnaturally
luminous, and have diffuse as a lighting check. I catch a lot of weird scene
bugs by noticing funny lighting on my test objects.
My guess is your camera statement needs some adjusting.
--
Daren Scot Wilson
dar### [at] pipelinecom
www.newcolor.com
----
"A ship in a harbor is safe, but that is not what ships are built for"
-- William Shedd
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mark Palmquist wrote in message <36D0AD19.445C4369@earthlink.net>...
>Ken,
>
> I have to agree that the lathe object definitly looks better on columns!
thanks
>for the hint. I will still indent most code but the coordinates will be in
>columns.:)
>
>My problem is I used ACTUAL measurements of a round sitting here at the
computer
>with a dial caliper. why do I need to double the height values? shouldn't
the
>lathe take real numbers and render a 'real' looking object?
>
I think I have your problem. With Lathe you enter the radius at the point in
question. Tou are directly measuring the object's diameter. Try dividing all
of the width numbers by 2 and that should fix your problem.
Rob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Robert G. Wright wrote:
> I think I have your problem. With Lathe you enter the radius at the point in
> question. Tou are directly measuring the object's diameter. Try dividing all
> of the width numbers by 2 and that should fix your problem.
>
> Rob
I knew it had to be as simple as this. Good catch.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|