0

Pov-Ray 3.7 installation on Ubuntu 14.04

download from the github repository and then follow the instruction.

git clone https://github.com/POV-Ray/povray.git
cd povray
cd unix
./prebuild.sh
cd ..
./configure COMPILED_BY="your name <email@address>"
make
make install

The terminal shows the following message:
The POV-Ray components will be installed in the following directories:

  • Program (executable): /usr/local/bin
  • System configuration files: /usr/local/etc/povray/3.7
  • User configuration files: /home/oyamada/.povray/3.7
  • Standard include files: /usr/local/share/povray-3.7/include
  • Standard INI files: /usr/local/share/povray-3.7/ini
  • Standard demo scene files: /usr/local/share/povray-3.7/scenes
  • Documentation (text, HTML): /usr/local/share/doc/povray-3.7
  • Unix man page: /usr/local/share/man
Advertisements
1

Kate: text editor by KDE

Kate is an editor for KDE environment. Even though I’m using Ubuntu, which is GNOME environment, Kate is the best editor I tried for these days.

Kate has

  1. syntax highlight
  2. command auto complete
  3. window splitting
  4. embedded terminal
  5. embedded terminal automatically cd to directory in which active directory is located
  6. and more…

 

0

SciTE: A free source code editor for Win32 and X

SciTE seems to be a good choice.

Setup the SciTE by following the manual:

  1. install SciTE
    using Synaptic Package Manager, apt-get, or compile from source.
  2. change Global settings
    Edit /usr/share/scite/SciTEGlobal.properties ( can edit on SciTE by selecting the menu “Options”->”Open Global Options File”.)

    1. enable to loading povray related file extension by adding ;*.pov;*.inc;*.ini;*.mcr around line #316
      From: *.properties;*.html;*.xml;*.iface;*.bat;*.e;*.m;*.mm
      To: *.properties;*.html;*.xml;*.iface;*.bat;*.e;*.m;*.mm;*.pov;*.inc;*.ini;*.mcr
    2. uncomment around line #572
      From: #P&OV-Ray SDL|pov||\
      To: P&OV-Ray SDL|pov||\
  3. change settings for povray
    Edit /usr/share/scite/pov.properties

    1. enable compile function from SciTE menu by editing around line # 182
      From: command.compile.*.pov=pvengine.exe $(FileName)
      To: command.compile.*.pov=povray +P $(FileName).pov
    2. enable auto-complete by uncomment around line #19-24
      From: #autocomplete.pov.ignorecase=1
      #autocomplete.pov.start.characters=.
      To: autocomplete.pov.ignorecase=1
      autocomplete.pov.start.characters=.

Now, we can use

  • command auto-complete
  • syntax highlight
  • command execution from terminal window
0

POV-Ray: Language directives

  1. #include
    loads .inc files that describe any data used in .pov files as:
    #include “file.inc”
  2. #declare and #local
    declares identifiers. Identifiers include vector, object, *_map, etc. For scalar, vector, and color, don’t forget put ; at the end:
    #declare PosCenter = <1, 2, 3>;
    #declare MyTorus = torus {5,1}
    #declare MyCheck = pigment{ …}
    identifiers
  3. #fopen, #fclose, #read, #write
    used forfile I/O as:
    #fopen fp “filename” read
    #read( fp, var1, var2, … )
    #fclose fp

    #fopen fp “filename” write
    #write( fp, “test “, var1, ” “, var2, … )
    #fclose fp

  4. #macro
    defines macros like function as:
    #macro MyMacro (var1, …)
    // do some processes
    #end
  5. #default
    sets default texture that is texture used when no texture is used.
  6. #switch, #case, #range
    used for branching as
    #switch (VALUE)

      #case (CASE_1)
        // do …
        #break
      #range (LOW_1, HIGH_1)
        // do …
        #break
      #case (CASE_2)
        // do …
        #break
      #range (LOW_2, HIGH_2)
        // do …
        #break
      #else
        // do …
    #end // end for switch
0

XPE: neXtgen Povray Editor

XPE (neXtgen Pov-ray Editor) is an editor for POV-Ray based on wxWidgets library. Here’s the quick commands list for XPE installation.

  1. sudo apt-get install libwxgtk2.8-dev libwxgtk2.8
  2. tar -zxf xpe_project_v0_9_5b.tar.gz
  3. cd xpe_project/
  4. ./configure
  5. make
  6. sudo make install

Contrast to PovClipse, XPE does not generate additional files for source code management. However, XPE does not show rendered images, meaning that we have to somehow show the image with any viewer.

0

PovClipse: eclipse plug-in for POR-Ray

PovClipse is an eclipse plug-in for POV-Ray and MegaPOV. Since the original tutorial assumes Windows, I briefly write how to setup on Ubuntu.

画像

  1. Edit povray.conf
    If rendering fails, you should add the following command in ~/.povray/3.6/povray.conf file. The command enables read/write under use’s home directory.
    read+wrote* = %HOME%
  2. Install eclipse
    sudo apt-get install eclipse
  3. Install PovClipse
    1. Run eclipse and select the menu Help->Install New Software.
    2. Write http://povclipse.sourceforge.net/updatesite in Work with dialog and then push Add button.
    3. Select PovClipse and go to Next.
    4. Accept the license and go to Next.
    5. Press Finish button.
  4. New PovClipse project
    1. Select the menu File->New->Project.
    2. Select PovClipse->PovClipse Project.
    3. Set default setting for other settings.
  5. General settings
    1. Select the menu Window->Preferences.
    2. Select PovClipse in the list shown at left hand side.
    3. Set Povray executable: /usr/local/bin/povray
    4. Set Povray library: /usr/local/share/povray-3.6/include
    5. NOTE: the above settings assumes that your povray installation follows default settings.
  6. Write scene file and render it.

Rendered image is shown in a window at left hand side:

0

POV-Ray: Editor

Contrast to POV-Ray on Windows, POV-Ray on Linux does not contain GUI*. Just for editing, any editor is fine, however, we’d also like render images while editing. In such sense, we prefer editor with rendering function. There exist several such editors:

  1. Geany: cross platform (source code)  editor. pros contains window split, terminal available, multiple lines editing. cons contains no official plug-in for POV-Ray, meaning that no syntax highlight and no command auto-complete, no rendering window.
  2. PovClipse: eclipse plug-in. almost of cons are due to my poor knowledge on eclipse. pros contains rendering windows, syntax highlight. cons contains no command auto-complete, a little bit complicated directory structure plus additional files for project management.
  3. XPE( neXtgen Pov-ray Editor): independent povray editor for both windows/linux. no update for these 3 years. pros contains window for command options, for +W800 +H600, syntax highlight. cons contains no rendering windows, no command auto-complete.
  4. Pyvon: independent povray editor. seems to be old, requires python 2.2! I couldn’t run the software due to compatibility with python version.
  5. QTPov Editor: old project of XPE.
  6. SciTE: cross platform (source code) editor. pros contains syntax highlight, command auto-complete, embedded terminal. cons contains terminal window does not look like terminal.
  7. Kate: text editor by KDE. pros contains syntax highlight, command auto-complete, embedded terminal, cd to a directory, in which active file is located. cons syntax has less variety on color .

* Here, GUI means editor with rendering function not modeler.