 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi,
is there any way (or macro) that can twist a heightfield around the
inside of a cylinder?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 16-02-06 23:56, Sven Littkowski a écrit :
> Hi,
>
> is there any way (or macro) that can twist a heightfield around the
> inside of a cylinder?
>
In the Windows vwesion, from the insert menu, look at and experiment with:
Special shapes, hight_field and HF macros, HF_Cylinder_macro
Special shapes, Mesh from meshmaker.inc, p_cylinder_cracle And
p_cylinder_crackle_2
Alain
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Yes, I saw them already, but when I tried the HF_Cylinder macro, it
causes errors and halt. The error message is: "Parse Error: Expected
'operator', ( found instead"
I think, the included code is faulty. If this code could be fixed, I
could go ahead with it.
Here the faulty code. Can you test, if this causes errors on your
computer, too?
// -------------- HF_Cylinder macro -------------------
#declare Fn_1 =
function(x, y, z)
{1-(-f_snoise3d(x*3,y*3 , z*3)*0.8)}
// ----------------------------------------------------
object{ HF_Cylinder( Fn_1, //Function,
0, // UseUVheight: 0 or 1
1, // UseUVtexture: 0 or 1
<50,50>, // Resolution,
1, // Smooth: 0 or 1
"", // FileName, ""=no file,
<0,0,0>, // EndA,
<0,1.5,0>, // EndB
1.60 ,// Radius
0.5 // Depth
) //-------------------------
texture{ pigment{ checker
color rgb<0.5,0.1,0.85>
color rgb<1,0.67, 0.05>
scale<1,2,1>*0.05}
finish { phong 1 reflection 0.01}
} // end of texture
scale<1,1,1>*1
rotate<0,0,0>
translate<0,0.00,0>
} // end of HF_Cylinder -------------------------------
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 02/07/2016 10:56 AM, Sven Littkowski wrote:
> Yes, I saw them already, but when I tried the HF_Cylinder macro, it
> causes errors and halt. The error message is: "Parse Error: Expected
> 'operator', ( found instead"
>
> I think, the included code is faulty. If this code could be fixed, I
> could go ahead with it.
>
> Here the faulty code. Can you test, if this causes errors on your
> computer, too?
Did you include shapes.inc which defines the macro ?
Bill P.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 07.02.2016 um 16:56 schrieb Sven Littkowski:
> Yes, I saw them already, but when I tried the HF_Cylinder macro, it
> causes errors and halt. The error message is: "Parse Error: Expected
> 'operator', ( found instead"
And the error location is...?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi, line 5 gives that error.
In this case, the error message mentions I might have to include
"functions.inc". I did a 2nd try, now having included "functions.inc",
but that is still causing the same error message, now without mentioning
"functions.inc".
Now I followed up the advise of William F. Pokorny, and added instead
"shapes.inc" to the code. The result is, that now finally the inserted
code is complete and functional, and I get what I wanted.
My conclusion is, that the INSERT code was incomplete: the include
"shapes.inc" was missing, or at least any hint that shapes.inc has to be
included was missing. How would someone know that? I use POV-Ray since
1989 or so and didn't know it. How would any newbie using the
comfortable INSERT options know, that more is required, if this is
nowhere mentioned or done. I think, any INSERT code needs to be complete
and functional, only then it makes sense.
I advise, to add such includes to each INSERT object where applicable,
and also to add a comment behind it mentioning that the include needs to
be there only one time (in case you use more than one INSERT objects
that require the same include).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Sven Littkowski <jam### [at] yahoo com> wrote:
>
> In this case, the error message mentions I might have to include
> "functions.inc". I did a 2nd try, now having included "functions.inc",
> but that is still causing the same error message, now without mentioning
> "functions.inc".
>
> Now I followed up the advise of William F. Pokorny, and added instead
> "shapes.inc" to the code. The result is, that now finally the inserted
> code is complete and functional, and I get what I wanted.
>
> My conclusion is, that the INSERT code was incomplete: the include
> "shapes.inc" was missing, or at least any hint that shapes.inc has to be
> included was missing...
I think you might be confused (?) about this. In order to use the HF_Cylinder
macro in "shapes.inc", you need to #include "shapes.inc" in your scene. (That's
covered in the documentation about #include files; and perhaps in the section
about macros too.) The macro *code* is there. Shapes.inc is available in
POV-Ray's insert menu-- at least it is in my own versions of POV-Ray. Then you
add
HF_Cylinder(...)
to your scene, to 'call' the macro, with the parameters you choose, and it makes
the (mesh) cylinder. The "shapes.inc" file has these additional #includes inside
it:
#include "shapes_old.inc"
#include "consts.inc"
#include "transforms.inc"
#include "strings.inc"
#include "math.inc"
Now, note that "math.inc" also includes "functions.inc" within itself; so you
don't have to add that.
I suspect that you initially tried to copy and paste *just* the HF_Cylinder
macro code itself into your scene (taken 'out' of shapes.inc); that would not
work, just by itself.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Kenneth" <kdw### [at] gmail com> wrote:
>
> I suspect that you initially tried to copy and paste *just* the HF_Cylinder
> macro code itself into your scene (taken 'out' of shapes.inc); that would not
> work, just by itself.
Sorry, I didn't look carefully at your code example before I posted my comments.
As mentioned earlier here, the only thing that's missing from your code is to
#include "shapes.inc" somewhere near the beginning of your scene file.
I've used the HF_Cylinder macro to make interesting 'cave' structures, that look
nicely organic, by combining different functions. It's quite a useful tool.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks. I just wished, the Inserts would be functional as they are,
means, they should include the contain the "shapes.inc" code.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Thanks. I just wished, the Inserts would be functional as they are,
> means, they should include the contain the "shapes.inc" code.
Most of the Insert items are not meant to be stand-alone scenes, but
IMHO they should at least contain a comment that states if any include
files are needed in the scene.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 9-2-2016 12:27, scott wrote:
>> Thanks. I just wished, the Inserts would be functional as they are,
>> means, they should include the contain the "shapes.inc" code.
>
> Most of the Insert items are not meant to be stand-alone scenes, but
> IMHO they should at least contain a comment that states if any include
> files are needed in the scene.
>
>
... or an #ndef() #include "...inc" #end statement which automatically
would include the necessary file.
--
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
/signed
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> On 9-2-2016 12:27, scott wrote:
> >
> > Most of the Insert items are not meant to be stand-alone scenes, but
> > IMHO they should at least contain a comment that states if any include
> > files are needed in the scene.
> >
> >
> ... or an #ndef() #include "...inc" #end statement which automatically
> would include the necessary file.
>
> --
> Thomas
Hmm, I'm wondering if I fully understand the question that was
asked. :-/ Are there insert menu items or #include files that do *not* also
include any additional needed #include files for the initial #include file to
work? (Sorry, that sounds kind of convoluted and funny!) I don't recall any
problems like that... or maybe so, when I first started using POV-Ray, but I
just worked around them...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Most of the Insert items are not meant to be stand-alone scenes, but
>>> IMHO they should at least contain a comment that states if any include
>>> files are needed in the scene.
>>>
>>>
>> ... or an #ndef() #include "...inc" #end statement which automatically
>> would include the necessary file.
>>
>> --
>> Thomas
>
> Hmm, I'm wondering if I fully understand the question that was
> asked. :-/ Are there insert menu items or #include files that do *not* also
> include any additional needed #include files for the initial #include file to
> work? (Sorry, that sounds kind of convoluted and funny!) I don't recall any
> problems like that... or maybe so, when I first started using POV-Ray, but I
> just worked around them...
As I understood the OP, the point is that when you add something from
the "Insert" menu, the text block that is inserted should tell you if
you need to also add any #include into your scene file to make that
block of code work.
Indeed some of the items in that menu start with something like:
//needs: #include "shapes.inc"
But the HF_Cylinder one, for example, gives no clues as to what file (if
any) you should #include to get it to work.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Congratulations, Folks -- you have just identified a problem that you
have the power to solve virtually by yourselves ;)
(1) Go to GitHub (https://github.com) and create an account there.
(2) Fork the POV-Ray repository (https://github.com/POV-Ray/povray.git).
(3*) Install the "GitHub Desktop" (https://desktop.github.com/) or any
other Git client of your choice.
(4*) Create a local copy of your POV-Ray repository fork.
(5) Edit the include menu snippets as you deem necessary (they reside at
"distribution/platform-specific/windows/Insert Menu").
(6*) Commit your changes to your local copy of the repository.
(7*) "Push" your changes to your POV-Ray repository fork at GitHub.
(8) Create a so-called "pull request".
This will automatically let us know that you have changed something,
review the changes you have made, and accept your changes into the
official POV-Ray respository by a simple click of a button.
(*If you're changing only a single file, you can skip the steps marked
with an asterisk.)
We need more names to add to the "with contributions from" section ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Sven Littkowski
Subject: Re: Question: Twisting a Heightfield?
Date: 9 Feb 2016 16:07:39
Message: <56ba551b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Okay, begin with adding my name to the "with contributions from" section
as I was the one who successfully identified these problems. ;-)
A decade-long dream comes true!!!!!!!!!!
On 09.02.2016 14:19, clipka wrote:
> Congratulations, Folks -- you have just identified a problem that you
> have the power to solve virtually by yourselves ;)
>
>
> (1) Go to GitHub (https://github.com) and create an account there.
>
> (2) Fork the POV-Ray repository (https://github.com/POV-Ray/povray.git).
>
> (3*) Install the "GitHub Desktop" (https://desktop.github.com/) or any
> other Git client of your choice.
>
> (4*) Create a local copy of your POV-Ray repository fork.
>
> (5) Edit the include menu snippets as you deem necessary (they reside at
> "distribution/platform-specific/windows/Insert Menu").
>
> (6*) Commit your changes to your local copy of the repository.
>
> (7*) "Push" your changes to your POV-Ray repository fork at GitHub.
>
> (8) Create a so-called "pull request".
>
> This will automatically let us know that you have changed something,
> review the changes you have made, and accept your changes into the
> official POV-Ray respository by a simple click of a button.
>
>
> (*If you're changing only a single file, you can skip the steps marked
> with an asterisk.)
>
>
> We need more names to add to the "with contributions from" section ;)
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 09.02.2016 um 22:07 schrieb Sven Littkowski:
> Okay, begin with adding my name to the "with contributions from" section
> as I was the one who successfully identified these problems. ;-)
>
> A decade-long dream comes true!!!!!!!!!!
I don't think merely sharing the experience of encountering a problem
qualifies for being added to the contributors' list -- but I might offer
you a prime location in the upcoming "with lots of pestering from"
section ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2/9/2016 9:22 PM, clipka wrote:
> but I might offer
> you a prime location in the upcoming "with lots of pestering from"
> section;)
Can I be in the "PITA with his stupid comments" section? :-)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 09.02.2016 um 23:13 schrieb Stephen:
> On 2/9/2016 9:22 PM, clipka wrote:
>> but I might offer
>> you a prime location in the upcoming "with lots of pestering from"
>> section;)
>
> Can I be in the "PITA with his stupid comments" section? :-)
I guess that could be arranged ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Sven Littkowski
Subject: Re: Question: Twisting a Heightfield?
Date: 10 Feb 2016 04:32:05
Message: <56bb0395@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Har har har!!! :-D
So, that means, I am a developer's nightmare... :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 10.02.2016 um 10:31 schrieb Sven Littkowski:
> Har har har!!! :-D
> So, that means, I am a developer's nightmare... :-)
Why, yes, of course -- isn't that the very definition of "user"? ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Then put me up there, right on the very first line. I still want to read
my name there, ha ha ha!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 10-2-2016 22:34, Sven Littkowski wrote:
> Then put me up there, right on the very first line. I still want to read
> my name there, ha ha ha!
>
Why?
--
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2/11/2016 7:54 AM, Thomas de Groot wrote:
> On 10-2-2016 22:34, Sven Littkowski wrote:
>> Then put me up there, right on the very first line. I still want to read
>> my name there, ha ha ha!
>>
>
> Why?
>
You mad fool, you. ;-)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11-2-2016 10:12, Stephen wrote:
> On 2/11/2016 7:54 AM, Thomas de Groot wrote:
>> On 10-2-2016 22:34, Sven Littkowski wrote:
>>> Then put me up there, right on the very first line. I still want to read
>>> my name there, ha ha ha!
>>>
>>
>> Why?
>>
>
> You mad fool, you. ;-)
>
Just curious ;-)
We have a saying here: "To want to be on the front row for a dime"
--
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Seriously, I would like a lot my name to be associated in any way with
POV-Ray. I use POV-Ray since the late 80's or so, when it was still
running under DOS. :-)
I came to deeply appreciate POV#Ray and the people behind it who
restlessly (excepted our CLipka :-P ) work hard on it day and night.
If only I could program in C++, too, I would have joined them a long
time ago. I develop software in Delphi (Pascal).
With my sense of humor, I would just have a good laugh if there is
something like that "PITA with his stupid comments" list (not even
knowing what PITA means), and my name is on top of it. As I know, that
my comments are not bad. :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11-2-2016 13:42, Sven Littkowski wrote:
> With my sense of humor, I would just have a good laugh if there is
> something like that "PITA with his stupid comments" list (not even
> knowing what PITA means), and my name is on top of it. As I know, that
> my comments are not bad. :-)
>
http://www.urbandictionary.com/define.php?term=pita
I don't know. Personally, I don't care much to be on any list or not,
independent of whether I have contributed something useful or not. It
just is beyond my frame of reference :-)
--
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2/11/2016 12:20 PM, Thomas de Groot wrote:
> On 11-2-2016 10:12, Stephen wrote:
>> On 2/11/2016 7:54 AM, Thomas de Groot wrote:
>>> On 10-2-2016 22:34, Sven Littkowski wrote:
>>>> Then put me up there, right on the very first line. I still want to
>>>> read
>>>> my name there, ha ha ha!
>>>>
>>>
>>> Why?
>>>
>>
>> You mad fool, you. ;-)
>>
> Just curious ;-)
>
> We have a saying here: "To want to be on the front row for a dime"
>
>
That sounds like me. My wife is partially sighted and gets front row
seats at concessionary prices. :)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Sven Littkowski
Subject: Re: Question: Twisting a Heightfield?
Date: 11 Feb 2016 14:11:04
Message: <56bcdcc8@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Thanks for the URL. I will make sure CLipka puts my name on it! :-D
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Question: Twisting a Heightfield?
Date: 12 Feb 2016 03:11:50
Message: <56bd93c6@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 11-2-2016 15:43, Stephen wrote:
> On 2/11/2016 12:20 PM, Thomas de Groot wrote:
>> On 11-2-2016 10:12, Stephen wrote:
>>> On 2/11/2016 7:54 AM, Thomas de Groot wrote:
>>>> On 10-2-2016 22:34, Sven Littkowski wrote:
>>>>> Then put me up there, right on the very first line. I still want to
>>>>> read
>>>>> my name there, ha ha ha!
>>>>>
>>>>
>>>> Why?
>>>>
>>>
>>> You mad fool, you. ;-)
>>>
>> Just curious ;-)
>>
>> We have a saying here: "To want to be on the front row for a dime"
>>
>>
> That sounds like me. My wife is partially sighted and gets front row
> seats at concessionary prices. :)
>
Ah! the exception confirming the rule ;-)
--
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |