POV-Ray : Newsgroups : povray.unix : POV-Ray 3.1g on Android 5+ Server Time
29 Mar 2024 09:04:44 EDT (-0400)
  POV-Ray 3.1g on Android 5+ (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Koppi
Subject: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 07:55:00
Message: <web.5703a674be33e802db8f4ad50@news.povray.org>
Teaser: https://imgur.com/a/p8Ali

Yesterday I installed https://termux.com/ - a terminal emulator and Linux
environment on my unrooted Nexus4 device (which runs Android 5+). Why not
run POV on my Android? I downloaded and installed POV-Ray 3.1g, something
like:

$ uname -a
Linux localhost 3.4.0-perf-gdffc258 #1 SMP PREEMPT Wed Jul 8 23:25:22 UTC 2015
armv7l Android
$ apt install vim wget make gcc
# wget [...] povuni_s.tgz and povuni_d.tgz
$ tar xfz povuni_s.tgz
$ cd povray31/source/unix/
$ vi makefile # minor adaptions:

CFLAGS      = -g -O2 -finline-functions -ffast-math -c -ansi
-DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC)
$(LIBPNGINC) $(ZLIBINC)

# Define the default POV-Ray library location
POVLIBDIR = /data/data/com.termux/files/usr/share/povray

# Define the path under which you want POV-Ray files to be installed,
# typically /usr/local/bin, though Linux distributions may wish to
# alter this to /usr/bin
POVPATH = /data/data/com.termux/files

$ make -j5 newunix
make[1]: Entering directory
'/data/data/com.termux/files/home/povray31/source/unix'
gcc -g -O2 -finline-functions -ffast-math -c -ansi
-DCOMPILER_VER=\".`uname`.gcc\"
-DPOV_LIB_DIR=\"/data/data/com.termux/files/usr/share/povray\" -I. -I..
-I../libpng -I../zlib ../bbox.c
gcc -g -O2 -finline-functions -ffast-math -c -ansi
-DCOMPILER_VER=\".`uname`.gcc\"
-DPOV_LIB_DIR=\"/data/data/com.termux/files/usr/share/povray\" -I. -I..
-I../libpng -I../zlib ../bezier.c

[...]

$ file povray
povray: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically
linked, interpreter /system/bin/linker, not stripped

$ cp povray /data/data/com.termux/files/usr/bin/povray
# wget [...] skyvase.pov

$ gdb povray
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-androideabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from povray...done.
(gdb) run +Iskyvase.pov
Starting program: /data/data/com.termux/files/home/povray31/source/unix/povray
+Iskyvase.pov
Persistence of Vision(tm) Ray Tracer Version 3.1g.Linux.gcc
  This is an unofficial version compiled by:
  FILL IN NAME HERE.........................
  The POV-Ray Team(tm) is not responsible for supporting this version.
Copyright 1999 POV-Ray Team(tm)
Quality settings 10 and 11 are no longer valid.
Use +QR if you need radiosity.
Parsing Options
  Input file: skyvase.pov (compatible to version 3.1)
  Remove bounds........On  Split unions........Off
  Library paths: /usr/local/lib/povray31
    /data/data/com.termux/files/usr/share/povray
    /data/data/com.termux/files/usr/share/povray/include
Output Options
  Image resolution 640 by 480 (rows 1 to 480, columns 1 to 640).
  Output file: skyvase.png, 24 bpp PNG
  Graphic display.....Off
  Mosaic preview......Off
  CPU usage histogram.Off
  Continued trace.....Off  Allow interruption...On  Pause when done.....Off
  Verbose messages....Off
Tracing Options
  Quality:  9
  Bounding boxes.......On  Bounding threshold: 25
  Light Buffer.........On  Vista Buffer.........On
  Antialiasing........Off
  Radiosity...........Off
Animation Options
  Clock value....   0.000  (Animation off)
Redirecting Options
  All Streams to console..........On
  Debug Stream to console.........On
  Fatal Stream to console.........On
  Render Stream to console........On
  Statistics Stream to console....On
  Warning Stream to console.......On


Parsing...
Program received signal SIGSEGV, Segmentation fault.
0xb6f91ca0 in sincos () from /system/lib/libm.so
(gdb) bt
#0  0xb6f91ca0 in sincos () from /system/lib/libm.so
#1  0x2a031cfc in MIdentity (result=0xbefff568) at ../matrices.c:132
#2  Compute_Axis_Rotation_Transform (transform=transform@entry=0xbefff568,
V1=V1@entry=0xbefff4d0,
    angle=<optimized out>) at ../matrices.c:880
#3  0x2a031efc in Compute_Coordinate_Transform (trans=0x2a0bdb40,
origin=0xbefff6c0,
    origin@entry=0xbefff6b8, up=up@entry=0xbefff6a0, radius=<optimized out>,
length=<optimized out>)
    at ../matrices.c:947
#4  0x2a0173e0 in Compute_Cone_Data (Object=Object@entry=0x2a0bdaa8) at
...../cones.c:893
#5  0x2a04ae3c in Parse_Cone () at ../parse.c:1489
#6  Parse_Object () at ../parse.c:3686
#7  0x2a04fe24 in Parse_RValue (Previous=Previous@entry=129,
NumberPtr=0x2a0bda7c, DataPtr=0x2a0bda78,
    ParFlag=ParFlag@entry=0, SemiFlag=SemiFlag@entry=1) at ../parse.c:5241
#8  0x2a051060 in Parse_Declare () at ../parse.c:4877
#9  0x2a07a67c in Parse_Directive (After_Hash=After_Hash@entry=1) at
...../tokenize.c:2421
#10 0x2a07d59c in Get_Token () at ../tokenize.c:988
#11 0x2a07e604 in Get_Token () at ../tokenize.c:863
#12 0x2a04d158 in Parse_Frame () at ../parse.c:3967
#13 Parse () at ../parse.c:195
#14 0x2a005c18 in FrameRender () at ../povray.c:420
#15 main (argc=<optimized out>, argv=<optimized out>) at ../povray.c:339
(gdb)

Not sure, what causes this..

--
Koppi


Post a reply to this message

From: Koppi
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 09:15:00
Message: <web.5703ba05ac2cbbfdb8f4ad50@news.povray.org>
... In /data/data/com.termux/files/home/povray31/source/unix/makefile I changed
the CFLAGS to:

CFLAGS      =  -fno-builtin-sin -fno-builtin-cos -O6 -c -ansi
-DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC)
$(LIBPNGINC) $(ZLIBINC)

... and adapted the libpng include and lib directives

PNGDIR = $(SRCDIR)/libpng
LIBPNGINC = -I$(PNGDIR)
LIBPNGLIB = $(PNGDIR)/libpng.a

Next, I built libpng.a and povray:

$ cd ../libpng
$ make -f scripts/makefile.lnx
$ make -j5 newunix
make[1]: Entering directory
'/data/data/com.termux/files/home/povray31/source/unix'
gcc -fno-builtin-sin -fno-builtin-cos -O6 -c -ansi
-DCOMPILER_VER=\".`uname`.gcc\"
-DPOV_LIB_DIR=\"/data/data/com.termux/files/usr/share/povray\" -I. -I..
-I../libpng -I../zlib ../atmosph.c

[...]

gcc ./atmosph.o ./bbox.o ./bcyl.o ./bezier.o ./blob.o ./boxes.o ./bsphere.o
../camera.o ./chi2.o ./colour.o ./cones.o ./csg.o ./discs.o ./express.o
../fractal.o ./gif.o ./gifdecod.o ./hcmplx.o ./hfield.o ./iff.o ./image.o
../interior.o ./lathe.o ./lbuffer.o ./lighting.o ./matrices.o ./media.o ./mem.o
../mesh.o ./normal.o ./objects.o ./octree.o ./optin.o ./optout.o ./parse.o
../parstxtr.o ./pattern.o ./pgm.o ./pigment.o ./planes.o ./png_pov.o ./point.o
../poly.o ./polygon.o ./polysolv.o ./povray.o ./ppm.o ./prism.o ./quadrics.o
../quatern.o ./rad_data.o ./radiosit.o ./ray.o ./render.o ./sor.o ./spheres.o
../super.o ./targa.o ./texture.o ./tokenize.o ./torus.o ./triangle.o ./truetype.o
../txttest.o ./userio.o ./vbuffer.o ./vlbuffer.o ./warps.o  ./unix.o
.../libpng/libpng.a -L../zlib -lz -lm -o povray

... and voila!

$ ./povray -i skyvase.pov +v1 -d +ft -x +a0.300 +r3 -q9 -w640 -h480 -mv2.0
+b1000
Persistence of Vision(tm) Ray Tracer Version 3.1g.Linux.gcc
  This is an unofficial version compiled by:
  FILL IN NAME HERE.........................
  The POV-Ray Team(tm) is not responsible for supporting this version.
Copyright 1999 POV-Ray Team(tm)
Quality settings 10 and 11 are no longer valid.
Use +QR if you need radiosity.
Parsing Options
  Input file: skyvase.pov (compatible to version 2.0)
  Remove bounds........On  Split unions........Off
  Library paths: /usr/local/lib/povray31
    /data/data/com.termux/files/usr/share/povray
    /data/data/com.termux/files/usr/share/povray/include
Output Options
  Image resolution 640 by 480 (rows 1 to 480, columns 1 to 640).
  Output file: skyvase.tga, 24 bpp Targa, 1000 KByte buffer
  Graphic display.....Off
  Mosaic preview......Off
  CPU usage histogram.Off
  Continued trace.....Off  Allow interruption..Off  Pause when done.....Off
  Verbose messages.....On
Tracing Options
  Quality:  9
  Bounding boxes.......On  Bounding threshold: 25
  Light Buffer.........On  Vista Buffer.........On
  Antialiasing.........On  (Method 1, Threshold 0.300, Depth 3, Jitter 1.00)
  Radiosity...........Off
Animation Options
  Clock value....   0.000  (Animation off)
Redirecting Options
  All Streams to console..........On
  Debug Stream to console.........On
  Fatal Stream to console.........On
  Render Stream to console........On
  Statistics Stream to console....On
  Warning Stream to console.......On


Parsing...........

Creating bounding slabs.
Scene contains 6 frame level objects; 3 infinite.

  0:00:25 Rendering line  480 of  480 supersampled 10 times.
Done Tracing
skyvase.pov Statistics, Resolution 640 x 480
----------------------------------------------------------------------------
Pixels:          307840   Samples:          395800   Smpls/Pxl: 1.29
Rays:           1642165   Saved:             10830   Max Level: 13/20
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
CSG Intersection               5293982          485831      9.18
Plane                         31763892        17019174     53.58
Quadric                        5293982         2257576     42.64
Sphere                         5293982          786477     14.86
----------------------------------------------------------------------------
Calls to Noise:            1701193   Calls to DNoise:        3165208
----------------------------------------------------------------------------
Shadow Ray Tests:          6093936   Succeeded:               139802
Reflected Rays:            1246365
----------------------------------------------------------------------------
Smallest Alloc:                 12 bytes   Largest:          1024008
Peak memory used:          1113872 bytes
----------------------------------------------------------------------------
Time For Trace:    0 hours  0 minutes  25.0 seconds (25 seconds)
    Total Time:    0 hours  0 minutes  25.0 seconds (25 seconds)


Post a reply to this message

From: dick balaska
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 11:49:21
Message: <5703de81$1@news.povray.org>
Am 2016-04-05 09:13, also sprach Koppi:

> Time For Trace:    0 hours  0 minutes  25.0 seconds (25 seconds)
>      Total Time:    0 hours  0 minutes  25.0 seconds (25 seconds)

Slick!  25 seconds to render and only 50% of your battery. ;)

-- 
dik


Post a reply to this message

From: Koppi
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 12:15:00
Message: <web.5703e46aac2cbbfdb8f4ad50@news.povray.org>
dick balaska <dic### [at] buckosoftcom> wrote:
> Slick!  25 seconds to render and only 50% of your battery. ;)

Was POVing the hole day on the 4 cores, temperature was around 44 degrees:

$ termux-battery-status
{
  "health": "GOOD",
  "percentage": 78,
  "plugged": "PLUGGED_USB",
  "status": "CHARGING",
  "temperature": 44.100000381469727
}


Post a reply to this message

From: Le Forgeron
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 13:21:23
Message: <5703f413@news.povray.org>
Le 05/04/2016 18:14, Koppi a écrit :
> 
> dick balaska <dic### [at] buckosoftcom> wrote:
>> Slick!  25 seconds to render and only 50% of your battery. ;)
> 
> Was POVing the hole day on the 4 cores, temperature was around 44 degrees:
> 
> $ termux-battery-status
> {
>   "health": "GOOD",
>   "percentage": 78,
>   "plugged": "PLUGGED_USB",
>   "status": "CHARGING",
>   "temperature": 44.100000381469727
> }
> 
> 

If you were using 3.1g, it was only a single core.


Post a reply to this message

From: Koppi
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 5 Apr 2016 16:45:00
Message: <web.5704227aac2cbbfdb8f4ad50@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> If you were using 3.1g, it was only a single core.

Oki, I just ran 4 instances of 3.1g with skyvase.pov on 4 terminals:

$ while [ true ]; do ssh nexus4 povray +Iskyvase.pov; done

htop session:

  http://imgur.com/49RXL94



  http://imgur.com/M1vVVVW



Post a reply to this message

From: jhu
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 8 Apr 2016 11:35:01
Message: <web.5707cf94ac2cbbf615a0e20@news.povray.org>
I've been doing the same with my phones. You can do more things with root access
though like run an sshd server.

Here's stuff I did with Povray 3.7 on my phones (and other devices):
http://forums.anandtech.com/showthread.php?t=2251730

Also did this with Blender:
http://forums.anandtech.com/showthread.php?t=2414161


Post a reply to this message

From: Bald Eagle
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 8 Apr 2016 19:00:00
Message: <web.570836ffac2cbbf80403a200@news.povray.org>
"jhu" <nomail@nomail> wrote:
> I've been doing the same with my phones. You can do more things with root access
> though like run an sshd server.
>
> Here's stuff I did with Povray 3.7 on my phones (and other devices):
> http://forums.anandtech.com/showthread.php?t=2251730
>
> Also did this with Blender:
> http://forums.anandtech.com/showthread.php?t=2414161

Oooh.   So I might be able to do something sick like run 3.7 on my Surface RT?

That would be crazy.   That totally needs to be in the Windows Store.  :)


Post a reply to this message

From: jhu
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 8 Apr 2016 22:00:04
Message: <web.570861abac2cbbf194284cc0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "jhu" <nomail@nomail> wrote:
> > I've been doing the same with my phones. You can do more things with root access
> > though like run an sshd server.
> >
> > Here's stuff I did with Povray 3.7 on my phones (and other devices):
> > http://forums.anandtech.com/showthread.php?t=2251730
> >
> > Also did this with Blender:
> > http://forums.anandtech.com/showthread.php?t=2414161
>
> Oooh.   So I might be able to do something sick like run 3.7 on my Surface RT?
>
> That would be crazy.   That totally needs to be in the Windows Store.  :)


Windows RT. I don't know if Microsoft fixed that though.

From 2013:
http://www.xda-developers.com/how-to-compile-and-port-win32-apps-for-windows-rt/

Well, let us know if it's still possible.


Post a reply to this message

From: Bald Eagle
Subject: Re: POV-Ray 3.1g on Android 5+
Date: 9 Apr 2016 17:05:00
Message: <web.57096d69ac2cbbf80403a200@news.povray.org>
"jhu" <nomail@nomail> wrote:


> Windows RT. I don't know if Microsoft fixed that though.
>
> From 2013:
> http://www.xda-developers.com/how-to-compile-and-port-win32-apps-for-windows-rt/

Right - I think that only works if you're running 8, not 8.1

> Well, let us know if it's still possible.

If I can figure out how to downgrade to 8 and then jailbreak it, then I might be
able to get it to work.  I'll look into it (again)  ;)


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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