POV-Ray : Newsgroups : povray.general : Calling external Math functions from .dll or .so Server Time
14 Nov 2024 21:12:57 EST (-0500)
  Calling external Math functions from .dll or .so (Message 1 to 10 of 103)  
Goto Latest 10 Messages Next 10 Messages >>>
From: verjigorm
Subject: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 10:25:01
Message: <web.420b7c34c551b3d17485eb850@news.povray.org>
I'd like to call Library-Functions from SDL. Is there already an extension
to POV-Ray that enables declaration of external user-defined functions?

I think of something like the JNI, only more simple. At least support for
double-type parameters and -arrays (for return-parameters) would be useful.

Regards, Arne

ps.: no, i dont want to generate pov-scene files and i dont want to create
data files and read them with sdl


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 10:39:45
Message: <420b8041@news.povray.org>
verjigorm wrote:
> I'd like to call Library-Functions from SDL. Is there already an extension
> to POV-Ray that enables declaration of external user-defined functions?

The source code of POV-Ray is available, so just compile it.

	Thorsten


Post a reply to this message

From: verjigorm
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 12:20:00
Message: <web.420b978b3223e4997485eb850@news.povray.org>
Yes, I already downloaded the code. Just wanted to check if any extension
already exists and if a feature like library support is going to be added
some day.
Sounds like a good idea to me, you know like in MATLAB for instance.
Thanks,
Arne

Thorsten Froehlich <tho### [at] trfde> wrote:
> verjigorm wrote:
> > I'd like to call Library-Functions from SDL. Is there already an extension
> > to POV-Ray that enables declaration of external user-defined functions?
>
> The source code of POV-Ray is available, so just compile it.
>
>  Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 12:37:01
Message: <420b9bbd$1@news.povray.org>
verjigorm wrote:
> Yes, I already downloaded the code. Just wanted to check if any extension
> already exists and if a feature like library support is going to be added
> some day.
 > Sounds like a good idea to me, you know like in MATLAB for instance.

No, it is an extremely bad idea as it is not portable and all this has been 
explained several times in these groups.  It is never going to be added to 
any official version of POV-Ray.

	Thorsten


Post a reply to this message

From: Mike Raiford
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 13:29:13
Message: <420ba7f9$1@news.povray.org>
Thorsten Froehlich wrote:

> No, it is an extremely bad idea as it is not portable and all this has 
> been explained several times in these groups.  It is never going to be 
> added to any official version of POV-Ray.

Not only that, but all it would take is one badly written plugin to 
corrupt POV-Ray's memory and crash POVRay with the blame on the POV-Team.

Though, I suppose you could use CORBA, COM, SOAP or any other IPC 
technology... <g,duck>

-- 
~Mike

Things! Billions of them!


Post a reply to this message

From: ingo
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 14:37:06
Message: <Xns95F9D1BD7FE35seed7@news.povray.org>
in news:420b9bbd$1@news.povray.org Thorsten Froehlich wrote:

> No, it is an extremely bad idea as it is not portable and all this
> has been explained several times in these groups.  It is never going
> to be added to any official version of POV-Ray.
> 

I've seen this awnser so often to similar questions, but I'm wondering, 
why does it work for other programming/scripting languages. I what way is 
POV-Ray different. I can imagine that it would be complex to add a new 
ray-traceable object through a module, but how about other stuff like, for 
example a database interface. 

http://python.active-venture.com/ext/intro.html
http://www.rubycentral.com/book/ext_ruby.html

Ingo


Post a reply to this message

From: ingo
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 14:47:22
Message: <Xns95F9D37A8908Dseed7@news.povray.org>
in news:Xns95F9D1BD7FE35seed7@news.povray.org ingo wrote:

> but how about other stuff like, for 
> example a database interface. 
> 

probably not the best example, her's another one: write the core of a slow 
mesh-creation macro in C and use it as if it is an include file or a part 
of an includefile package.


Post a reply to this message

From: Tom Melly
Subject: Re: Calling external Math functions from .dll or .so
Date: 10 Feb 2005 18:05:13
Message: <420be8a9$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:420b9bbd$1@news.povray.org...

> verjigorm wrote:
>  > Sounds like a good idea to me, you know like in MATLAB for instance.

Yes, it does sound like a good idea - however, for reasons Thorsten so
vigorously defended but didn't bother to explain, it probably won't happen.

> No, it is an extremely bad idea as it is not portable and all this has
been
> explained several times in these groups.  It is never going to be added to
> any official version of POV-Ray.

I've often wondered. Bearing in mind my ignorance of high-end programming,
wouldn't it be possible to run a binary with a command line switch to tell
it to take advantage of specified system-specific libaries?

Bugs would be the responsibility of the library author, unless the bug was
repeatable w/o the library being loaded.

Or would such libraries be horribly inefficient?


Post a reply to this message

From: Matthias Weißer
Subject: Re: Calling external Math functions from .dll or .so
Date: 11 Feb 2005 11:41:31
Message: <420ce03b$1@news.povray.org>
Thorsten Froehlich schrieb:
> verjigorm wrote:
>> Yes, I already downloaded the code. Just wanted to check if any extension
>> already exists and if a feature like library support is going to be added
>> some day.
>  > Sounds like a good idea to me, you know like in MATLAB for instance.
> 
> No, it is an extremely bad idea as it is not portable and all this has been 
> explained several times in these groups.  It is never going to be added to 
> any official version of POV-Ray.

I would like to ask why this would be not portable? Any platform POVRay 
runs on should support dynamic loading. Or does POVRay compiles under 
plain DOS?

For my self I don't have any application to use such an interface off 
POVRay because my .pov's are written from another programm or by hand. 
It's only a technical question.

-- 

mat### [at] matweide
http://www.matwei.de


Post a reply to this message

From: Mike Raiford
Subject: Re: Calling external Math functions from .dll or .so
Date: 11 Feb 2005 11:51:05
Message: <420ce279@news.povray.org>

> Thorsten Froehlich schrieb:
> 
>> verjigorm wrote:
>>
>>> Yes, I already downloaded the code. Just wanted to check if any 
>>> extension
>>> already exists and if a feature like library support is going to be 
>>> added
>>> some day.
>>
>>  > Sounds like a good idea to me, you know like in MATLAB for instance.
>>
>> No, it is an extremely bad idea as it is not portable and all this has 
>> been explained several times in these groups.  It is never going to be 
>> added to any official version of POV-Ray.
> 
> 
> I would like to ask why this would be not portable? Any platform POVRay 
> runs on should support dynamic loading. Or does POVRay compiles under 
> plain DOS?
> 
> For my self I don't have any application to use such an interface off 
> POVRay because my .pov's are written from another programm or by hand. 
> It's only a technical question.

Dynamic loading and linking is not standardised across platforms. Each 
OS has it's own way of loading an external module and "fixing up" the 
procedure addresses.

-- 
~Mike

Things! Billions of them!


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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