POV-Ray : Newsgroups : povray.off-topic : How to read source code? Server Time
29 Jul 2024 02:20:02 EDT (-0400)
  How to read source code? (Message 21 to 27 of 27)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mr
Subject: Re: How to read source code?
Date: 8 Feb 2013 03:55:00
Message: <web.5114bccff5f10c30ed29e82f0@news.povray.org>
>
> Kind of like using Moray or Blender to generate POV-Ray SDL.
>

Of course I must disagree, have you actually tried Blender's POV-Ray exporter,
it has options to choose whether to insert line breaks or not for meshes
readability, it inserts comment sections to clarify which does what, you can
specify it where to put your files, and pass  command line arguments along to
it.

And if you find anything not clean, just tell me what, I'll correct it,  or help
you do it  yourself if you want (the exporter's Python code is GPL licenced so
it's free for any use)

If you think it's "not clean" because you just want to see primitives instead of
mesh2, it's not hard to implement, just that nobody requested it yet, as opposed
to other features like hair export that I added right away.

To get back on topic, I don't think of visual 3D editors as generating dirty POV
code, I see them more like tools to generate a draft to be improved by little
tweaking(or left as is when you are satisfied with the result or in a hurry).


Post a reply to this message

From: Mr
Subject: Re: How to read source code?
Date: 8 Feb 2013 04:05:01
Message: <web.5114bf06f5f10c30ed29e82f0@news.povray.org>
"Mr" <nomail@nomail> wrote:
> >
> > Kind of like using Moray or Blender to generate POV-Ray SDL.
> >
>
> Of course I must disagree, have you actually tried Blender's POV-Ray exporter,
> it has options to choose whether to insert line breaks or not for meshes
> readability, it inserts comment sections to clarify which does what, you can
> specify it where to put your files, and pass  command line arguments along to
> it.
>
> And if you find anything not clean, just tell me what, I'll correct it,  or help
> you do it  yourself if you want (the exporter's Python code is GPL licenced so
> it's free for any use)
>
> If you think it's "not clean" because you just want to see primitives instead of
> mesh2, it's not hard to implement, just that nobody requested it yet, as opposed
> to other features like hair export that I added right away.
>
> To get back on topic, I don't think of visual 3D editors as generating dirty POV
> code, I see them more like tools to generate a draft to be improved by little
> tweaking(or left as is when you are satisfied with the result or in a hurry).

Actually I forgot about that, but there is even a feature to replace stuff with
custom POV code, making stand in primitive objects unneccessary IMHO, yet again,
I'm open to suggestions .


Post a reply to this message

From: Kenneth
Subject: Re: How to read source code?
Date: 9 Feb 2013 15:05:00
Message: <web.5116a9c4f5f10c30c2d977c20@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:

>
> Then there's a kind of third category, where a language is actually
> compiled, but not to native machine code, but to a more hardware-independent
> "byte code", which is then "interpreted" by a runtime environment...[clip]
>
> Of course it can get even more complicated than this. The most advanced
> runtime environments will compile the "custom machine code" into actual
> machine code of the CPU on the fly, for speed.

This is what I understand Java to be (at least, the Windows Java Runtime
Environment.)

BTW, your entire post is a very informative summary of these topics; I haven't
seen it described so clearly and succinctly before. Much appreciated!


Post a reply to this message

From: Kenneth
Subject: Re: How to read source code?
Date: 9 Feb 2013 15:25:01
Message: <web.5116afdff5f10c30c2d977c20@news.povray.org>
"Mr" <nomail@nomail> wrote:
> >
> > Kind of like using Moray or Blender to generate POV-Ray SDL.
> >
>
> Of course I must disagree, have you actually tried Blender's POV-Ray exporter,
> it has options to choose whether to insert line breaks or not for meshes
> readability, it inserts comment sections to clarify which does what, you can
> specify it where to put your files, and pass  command line arguments along to
> it.

;-)

I have to admit that I haven't yet tried Blender--but that's definitely on my
future to-do list. Seems to have LOTS of features--and the interface reminds me
somewhat of Lightwave. (That's a compliment, BTW... :-) ... as I really liked
playing around with an older version, one that came installed on a used PC I
bought; alas, it had a major bug there, so I stopped using it.)


Post a reply to this message

From: Patrick Elliott
Subject: Re: How to read source code?
Date: 10 Feb 2013 17:14:50
Message: <51181bda$1@news.povray.org>
On 2/9/2013 1:21 PM, Kenneth wrote:
> "Mr" <nomail@nomail> wrote:
>>>
>>> Kind of like using Moray or Blender to generate POV-Ray SDL.
>>>
>>
>> Of course I must disagree, have you actually tried Blender's POV-Ray exporter,
>> it has options to choose whether to insert line breaks or not for meshes
>> readability, it inserts comment sections to clarify which does what, you can
>> specify it where to put your files, and pass  command line arguments along to
>> it.
>
> ;-)
>
> I have to admit that I haven't yet tried Blender--but that's definitely on my
> future to-do list. Seems to have LOTS of features--and the interface reminds me
> somewhat of Lightwave. (That's a compliment, BTW... :-) ... as I really liked
> playing around with an older version, one that came installed on a used PC I
> bought; alas, it had a major bug there, so I stopped using it.)
>
Its improved.. The older version, at least for me, being used to drop 
down menus, and not needing to use a mess of keypresses I had to 
remember, etc., was like the "Wordstar" of 3D applications.


Post a reply to this message

From: Francois Labreque
Subject: Re: How to read source code?
Date: 12 Feb 2013 17:48:44
Message: <511ac6cc$1@news.povray.org>

>
>>
>> Kind of like using Moray or Blender to generate POV-Ray SDL.
>>
>
> Of course I must disagree, have you actually tried Blender's POV-Ray exporter,

I admit it's been a while.

> it has options to choose whether to insert line breaks or not for meshes
> readability, it inserts comment sections to clarify which does what, you can
> specify it where to put your files, and pass  command line arguments along to
> it.

I didn't mean to single out Blender, nor Moray.  It was just a general 
statement that exporting from a WYSIWIG format into a text-based format 
will usually lead to either (a) missing stuff, (b) extraneous stuff, or 
(c) stuff that could have been done more clearly in the native language.

(The absolute worst example I can think of would be MS-Office's "save as 
HTML")

> To get back on topic, I don't think of visual 3D editors as generating dirty POV
> code, I see them more like tools to generate a draft to be improved by little
> tweaking(or left as is when you are satisfied with the result or in a hurry).

This is exactly what I'm saying too.  "jumbled mess" may have been a 
slight exageration.

-- 
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/*    flabreque    */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/*        @        */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/*   gmail.com     */}camera{orthographic location<6,1.25,-6>look_at a }


Post a reply to this message

From: andrel
Subject: Re: How to read source code?
Date: 12 Feb 2013 18:47:12
Message: <511AD48D.8030503@gmail.com>
On 6-2-2013 20:30, Kenneth wrote:
> Not how to 'understand' source code ;-)
>
> Just wondering what kind of little Windows app I could download to actually
> *see* (take a look at) the source code for a program (well, one that has
> publicly-available source code, anyway--like POV-Ray.) I've never thought of
> doing so before now, and don't know what's involved. Not to EDIT the stuff, or
> compile/recompile it; that's way beyond me.
>
>  From what I've read, some 'text' editors can do this. Or would it require a 'hex
> editor'?  Or perhaps something like Notepad++, which apparently can open and
> display programs written in C, C++ etc?
>
> What I would basically like to do is see the code the way the original developer
> saw it, while writing it (in whatever programming language that happened to be.)
> I might even learn a few things!
>

An interesting read might also be 
http://www.amazon.com/Computers-Typesetting-Volume-TeX-Program/dp/0201134373/
That is the complete Source code of TeX, fully documented and typeset 
in... TeX and published as a book.

But perhaps first look it up in your local university library.

    Andrel

-- 
Women are the canaries of science. When they are underrepresented
it is a strong indication that non-scientific factors play a role
and the concentration of incorruptible scientists is also too low


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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