POV-Ray : Newsgroups : povray.unofficial.patches : I'm proud ... what now? Server Time
3 Jul 2024 05:13:44 EDT (-0400)
  I'm proud ... what now? (Message 1 to 2 of 2)  
From: jan w
Subject: I'm proud ... what now?
Date: 19 Oct 2002 18:19:48
Message: <3db1da84@news.povray.org>
Hello POVers ...

After a large period of POV-abstinence I'm back now, to play with this toy.
In the last weeks I was merely preparing for an exam (which I still didn't 
pass)-; and I reinstalled my network at home ...
On my workstation there's now Linux and I'll try to migrate from Windows.

This gave me the chance to introduce into C(++)-programming. And what would be
the best subject for this exercise: POV-Ray ...

So I took the chance and only needed some hours to play with the sourcecode
and implement a pattern I sometimes use (often enough) but still needed to
achieve with layered textures. 

So I have a working version of a gridline-pattern now, that has the following 
syntax:

pigment {
    grid COLOR_1, COLOR_2
    [grid_size <Size>] 
    }
    
the semantics is pretty simple:

X=Point.x-floor(Point.x);
Y=Point.y-floor(Point.y);
Z=Point.z-floor(Point.z);
return (
	(
	 (X < grid_size.x)
       ||(Y < grid_size.y)
       ||(Z < grid_size.z)
        )
	? 1 
	: 0 
	)

So this is nothing special for the POV-Core-development-team, but for me it 
was something like the HelloWorld in POV. It works so far as expected, and 
seems to be "a bit faster" than the three-layer-solution I used before. My 
Question is now: How to continue?

I have commented the source, where I have changed/inserted Code. Lets consider
this would be a useful add to POV, what would be the next steps, I should make
to offer it to community? Has there been some consensus on how to create a doc
for that and btw: How do I create a patch for these modifications now? (I've 
not done very much programing under linux, yet, so diff/patch are quite un-
known to me and I'd prefer some help on how to create a proper patch-file that
would suite into the PoPOV-repository ...)

So far ... thanks for reading this stuff ... 
I still have the hope to get some replies ... Jan

-- 
   \   _      \   \    _ \  ___   __
    \ / \ \/\  \   \  / \ \    Z  L_) \/\
 \__/ \_/\ \ \  \/-_\ \_/\ \_ Z__ \__/ \


Post a reply to this message

From: Christopher James Huff
Subject: Re: I'm proud ... what now?
Date: 20 Oct 2002 11:46:23
Message: <3db2cfcf@news.povray.org>
<jan### [at] lzernet> wrote in message news:3db1da84@news.povray.org...
> So this is nothing special for the POV-Core-development-team, but for me
it
> was something like the HelloWorld in POV. It works so far as expected, and
> seems to be "a bit faster" than the three-layer-solution I used before. My
> Question is now: How to continue?

That's exactly what it is...I started out patching by adding a "solid"
pattern. It isn't that useful now, you can use a function pattern instead,
but it was simple and a fast way to blend between textures in an animation.
I also used a pattern as the basis for my patch writing tutorial...maybe
I'll update it for 3.5. It would become obsolete because of 4.0, but there
seems to be quite a few people interested in patching POV 3.5.

> I have commented the source, where I have changed/inserted Code. Lets
consider
> this would be a useful add to POV, what would be the next steps, I should
make
> to offer it to community? Has there been some consensus on how to create a
doc
> for that and btw: How do I create a patch for these modifications now?
(I've
> not done very much programing under linux, yet, so diff/patch are quite
un-
> known to me and I'd prefer some help on how to create a proper patch-file
that
> would suite into the PoPOV-repository ...)

Well, the way I do it is this:
Enclose the patched portions of the code with preprocessor directives:
#ifdef GridPatternPatch
...grid pattern stuff...
#endif

Then either distribute the modified files or the modified pieces of code
with instructions on how to add them, what files/functions they go in. I
give some of the surrounding code to make this easier...line numbers are too
unreliable. I've never used a utility for this, I try to make it easy to do
by hand...partly because I haven't taken the time to learn how to use the
utilities and partly because not everyone else has or knows how to use them.


Post a reply to this message

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