POV-Ray : Newsgroups : povray.programming : Editing density structure : Re: Editing density structure Server Time
5 Jul 2024 14:02:56 EDT (-0400)
  Re: Editing density structure  
From: Thomas Willhalm
Date: 14 Aug 2003 09:22:58
Message: <3f3b8d31@news.povray.org>
Hello Maurya,

Maurya wrote:
> The density tag can be used with the colormap to render each voxel with
> a differenct color depending on the density. I want to add another
> parameter like temperature to each voxel in deciding its color.
> 
> Can somebody give me some initial guidelines as to how to proceed with
> this idea. I am a new developer on povray, hence I dont have much idea of
> the structure of the code..

I'm by far not an expert in POV-Ray code, so others should correct me if I'm
wrong. To the best of my knowledge, you should change the following:
- Add the necessary data types to the Media_Struct in frame.h
  (e.g. a pointer to a pigment)
- Initialize your additional data fields in Create_Media in media.cpp
- Make sure memory is freed in Destroy_Media in media.cpp (if necessary)
- Copy your data in Copy_Media in media.cpp
- Add code to parse your extension in Parse_Media in parstxtr.cpp
- If you add new tokens, declare them in parse.h and define them in   
  tokenize.cpp
- In sample_media in media.cpp the color is computed according to
  extinction, scattering, and emission. Make the changes you have in mind
  here.

Best regards
Thomas

-- 
aaa := ira


Post a reply to this message

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