POV-Ray : Newsgroups : povray.newusers : Sphere_Sweep help! Server Time
31 Jul 2024 02:30:51 EDT (-0400)
  Sphere_Sweep help! (Message 1 to 4 of 4)  
From: Sean Sabbage
Subject: Sphere_Sweep help!
Date: 17 May 2003 11:27:16
Message: <BAEC1363.23E22%sabbas@btinternet.com>
Hi... my first post here... but anyway, to get right down to the question.
I'm trying to use a sphere sweep, but I get a strange error message that I
don't understand. Any help?

Attempt to malloc zero size block (File: sphsweep.cpp Line: 1613).

File NewShip line 202

here's the code

sphere_sweep {
    cubic_spline
    3,
    <0,0,0>,3
    <5,5,0>,3
    <10,0,0>,3
    pigment {Green}
}

should I have more spheres for a cubic_spline?

Sean


Post a reply to this message

From: St 
Subject: Re: Sphere_Sweep help!
Date: 17 May 2003 13:18:41
Message: <3ec66ef1@news.povray.org>
"Sean Sabbage" <sab### [at] btinternetcom> wrote in message
news:BAEC1363.23E22%sab### [at] btinternetcom...
> Hi... my first post here... but anyway, to get right down to the
question.
> I'm trying to use a sphere sweep, but I get a strange error message
that I
> don't understand. Any help?
>
> Attempt to malloc zero size block (File: sphsweep.cpp Line: 1613).
>
> File NewShip line 202
>
> here's the code
>
> sphere_sweep {
>     cubic_spline
>     3,
>     <0,0,0>,3
>     <5,5,0>,3
>     <10,0,0>,3
>     pigment {Green}
> }
>
> should I have more spheres for a cubic_spline?

 Hi, I'm not sure what the above error actually means, but I think
yes, you should specify 4 spheres for a cubic_spline, and 4 lines of
parameters, here's a golden worm-like thingy:

sphere_sweep {
   cubic_spline
    4,

    <-3, 4, -3>, .03
    <-5, 0, 0>, 0
    <-1, 0, 0>, .3
    <-2, 5, 0>, 2

    translate <2.5, 1, 0>
    scale 3
    texture {T_Gold_2A}}

   ~Steve~


>
> Sean
>


Post a reply to this message

From: gonzo
Subject: Re: Sphere_Sweep help!
Date: 17 May 2003 15:39:28
Message: <3ec68ff0@news.povray.org>
Sean Sabbage <sab### [at] btinternetcom> wrote in message
news:BAEC1363.23E22%sab### [at] btinternetcom...
> Attempt to malloc zero size block (File: sphsweep.cpp Line: 1613).
(snip)
> sphere_sweep {
>     cubic_spline
>     3,
>     <0,0,0>,3
>     <5,5,0>,3
>     <10,0,0>,3
>     pigment {Green}
> }
>
> should I have more spheres for a cubic_spline?

Yes.
This works fine...
sphere_sweep {
     cubic_spline
     5,
     <-1,0,0>,3
     <0,0,0>,3
     <5,5,0>,3
     <10,0,0>,3
     <11,0,0>,3
     pigment {Green}
}

RG


Post a reply to this message

From: Chris Amshey
Subject: Re: Sphere_Sweep help!
Date: 22 Jun 2003 05:20:01
Message: <web.3ef573afe077244361b99e900@news.povray.org>
St. wrote:
>"Sean Sabbage" <sab### [at] btinternetcom> wrote in message
>news:BAEC1363.23E22%sab### [at] btinternetcom...
>> Attempt to malloc zero size block (File: sphsweep.cpp Line: 1613).
>>

> Hi, I'm not sure what the above error actually means, but I think
>yes, you should specify 4 spheres for a cubic_spline, and 4 lines of
>parameters, here's a golden worm-like thingy:
>

It means there's a (minor) bug in the code. POVray failed to recognize that
the cubic_spline was short by a required argument, did the math anyway, came
up with a spline of 0 length, attempted to allocate 0 bytes of memory to
store information about the 0-length path... and then did nothing else.

The warning message is not a standard C warning message, so somebody in The
Team
was clever enough to put that warning into an allocation routine or macro so
that errors like that would be caught and fixed, hopefully before doing any
real damage... (knock on wood...;))

--Chris


Post a reply to this message

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