packages feed

Attrac 0.1.2 → 0.1.3

raw patch · 5 files changed

+21/−10 lines, 5 filesdep +arraydep −haskell98dep ~GLUTdep ~OpenGL

Dependencies added: array

Dependencies removed: haskell98

Dependency ranges changed: GLUT, OpenGL

Files

Attrac.cabal view
@@ -1,18 +1,20 @@ name:                Attrac-version:             0.1.2+version:             0.1.3 author:              Ruben Henner Zilibowitz <rzilibowitz at yahoo dot com dot au> maintainer:          Ruben Henner Zilibowitz <rzilibowitz at yahoo dot com dot au> homepage:            http://patch-tag.com/r/rhz/StrangeAttractors license:             BSD3 license-file:        LICENSE category:            Graphics-extra-source-files:  README Setup.hs Attrac.hs SprottCodes.hs-build-depends:       base >= 2 && < 4, haskell98, OpenGL, GLUT, colour, random+extra-source-files:  README Setup.hs Attrac.hs SprottCodes.hs GLTypeConversion.hs+build-depends:       base >= 2 && < 4, OpenGL >= 2.4.0.1, GLUT >= 2.2.2.0, colour, random, array tested-with:         GHC ==6.10.4 build-type:          Simple synopsis:            Visualisation of Strange Attractors in 3-Dimensions description:         This software uses innovative techniques to achieve 3-D visualisation 		     of the point sets known as Strange Attractors resulting from iteration-		     of non-linear maps on points in Euclidean Space.+		     of non-linear maps on points in Euclidean Space. Version 0.1.3 requires new+      		     versions of OpenGL and GLUT libraries. Use version 0.1.2 is you have+		     old OpenGL and GLUT and don't want to upgrade. executable:          Attrac main-is:             AttracCloudView.hs
Attrac.hs view
@@ -1,6 +1,6 @@ module Attrac where -import Array+import Data.Array import System.Random  type Value = Double
AttracCloudView.hs view
@@ -11,15 +11,16 @@ import System.Exit ( exitWith, ExitCode(ExitSuccess) ) import Graphics.Rendering.OpenGL as OpenGL import Graphics.UI.GLUT as GLUT-import IO(hFlush,stdout)-import Array+import System.IO(hFlush,stdout)+import Data.Array as Array import Data.Colour.RGBSpace.HSL import Data.Colour.SRGB as SRGB import System.Random-import Char+import Data.Char  import Attrac import SprottCodes+import GLTypeConversion  ffm cs (p1,Pt x y z) = let (p2,Mat tx _ _ ty _ _ tz _ _) = fm cs (p1,Mat x 1 1 y 0 0 z 0 0) in (p2,Pt tx ty tz) @@ -165,7 +166,7 @@    buf <- readIORef (curBuffer state)    renderPrimitive Points$sequence_ [let (x,c) = buf!(px,py)                                      in let SRGB.RGB r g b = hsl (colorSpeed * fromIntegral c) 1 (x / (fromIntegral c))-                                        in (color$Color4 r g b 1) >>+                                        in (color$Color4 (convertGLdouble r) (convertGLdouble g) (convertGLdouble b) 1) >>                                            (vertex$Vertex2 (fromIntegral px :: GLint)                                             (fromIntegral py :: GLint)) | ((px,py),_) <- xs]    writeIORef (curP state) q
+ GLTypeConversion.hs view
@@ -0,0 +1,8 @@+module GLTypeConversion where++import Graphics.Rendering.OpenGL+import Unsafe.Coerce++convertGLdouble :: Double -> GLdouble+-- convertGLdouble = realToFrac+convertGLdouble = unsafeCoerce
SprottCodes.hs view
@@ -1,6 +1,6 @@ module SprottCodes where -import Char+import Data.Char  codes =  [	"IQDFKLQTIPQINQINWSSPNJTROQIOVQF",