POV-Ray : Newsgroups : povray.newusers : Newbie needs help with first project : Newbie needs help with first project Server Time
5 Oct 2024 15:34:32 EDT (-0400)
  Newbie needs help with first project  
From: Jovian Ghost
Date: 7 Oct 2009 16:15:00
Message: <web.4accf4c32148fdf42a2ae5f70@news.povray.org>
Hello all,

First-time POV-Ray user here. I've been reading up and experiementing, and
decide I want to do something.

For my first real project, I thought I'd start small, so I decided to do the
Chevrolet logo. For those of you who don't know, here it is:
http://questautosale.com/html/chevy_logo.jpg

Ok so, I've decided probably the best approach is to break it up until multiple
pieces. The center square will be one piece, the crossbar another, and the left
and right angled tips will be two more.

Well I'm finding it's not as easy I thought.

I'm first starting with the central square. Looks to me like it's a cut-off
pyramid, so I created a prism with conic_sweep and a bezier_spline profile.
Works well, but the problem is at the pyramid's cut-off point, the edges are
sharp. I was wondering how I could smooth these out? I was thinking something
like a lathe, except instead of revolving around a single axis, revolve around a
path.

I'm sorry if my description is not very accurate, I can't really describe what I
mean.

Here's some sample code. (There's probably a MUCH easier way of creating the
bezier but at the moment I'm very new and am just starting to get a grasp on
things.)

#include "colors.inc"

#local CAM_POS = <0, 0, -20>;
#local LIGHT_POS = <10, 10, -25>;

camera
{
    location CAM_POS
    look_at <0, 0, 0>
}

light_source
{
    LIGHT_POS
    rgb <1, 1, 1>
}

#local SIZE = 1;

prism
{
    conic_sweep
    bezier_spline
    0.8, 1, 48
    // lower right
    <0, -SIZE>, <0.1*SIZE, -SIZE>, <0.7*SIZE, -SIZE>, <0.8*SIZE, -SIZE>,
    <0.8*SIZE, -SIZE>, <SIZE, -SIZE>, <SIZE, -SIZE>, <SIZE, -0.8*SIZE>,
    <SIZE, -0.8*SIZE>, <SIZE, -0.7*SIZE>, <SIZE, -0.1*SIZE>, <SIZE, 0>,
    // upper right
    <SIZE, 0>, <SIZE, 0.1*SIZE>, <SIZE, 0.7*SIZE>, <SIZE, 0.8*SIZE>,
    <SIZE, 0.8*SIZE>, <SIZE, SIZE>, <SIZE, SIZE>, <0.8*SIZE, SIZE>,
    <0.8*SIZE, SIZE>, <0.7*SIZE, SIZE>, <0.1*SIZE, SIZE>, <0, SIZE>,
    // upper left
    <0, SIZE>, <-0.1*SIZE, SIZE>, <-0.7*SIZE, SIZE>, <-0.8*SIZE, SIZE>,
    <-0.8*SIZE, SIZE>, <-SIZE, SIZE>, <-SIZE, SIZE>, <-SIZE, 0.8*SIZE>,
    <-SIZE, 0.8*SIZE>, <-SIZE, 0.7*SIZE>, <-SIZE, 0.1*SIZE>, <-SIZE, 0>,
    // lower left
    <-SIZE, 0>, <-SIZE, -0.1*SIZE>, <-SIZE, -0.7*SIZE>, <-SIZE, -0.8*SIZE>,
    <-SIZE, -0.8*SIZE>, <-SIZE, -SIZE>, <-SIZE, -SIZE>, <-0.8*SIZE, -SIZE>,
    <-0.8*SIZE, -SIZE>, <-0.7*SIZE, -SIZE>, <-0.1*SIZE, -SIZE>, <0, -SIZE>
    pigment { color Yellow }
    scale <10, 10, 10>
    rotate <90, 0, 0>
}


Post a reply to this message

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