home *** CD-ROM | disk | FTP | other *** search
- From theseas!Princeton.EDU!cek Mon, 25 Jul 94 22:12:55 EET
- Received: by kriton.UUCP (V1.17-beta/Amiga)
- id <03ug@kriton.UUCP>; Mon, 25 Jul 94 22:12:55 EET
- Received: by theseas.ntua.gr with UUCP; Mon, 25 Jul 1994 11:34:04 +0300
- Received: from nemesis.ics.forth.gr (nemesis.csi.forth.gr) by pythia.ics.forth.gr via FORTHnet with SMTP;
- id AA01801 (5.65c/FORTH-ICS-3.0-MHS-7.0); Mon, 25 Jul 1994 04:09:42 +0300
- Received: from eunet.EU.net by nemesis.ics.forth.gr via FORTHnet with SMTP;
- id AA19516 (5.65c/ICS-1.1); Mon, 25 Jul 1994 04:01:17 +0300 (EET DST)
- Received: (uunet@localhost) by eunet.EU.net (8.6.8/8.6.4) with UUCP id DAA14799 for ariadne!theseas!kriton!kyrimis; Mon, 25 Jul 1994 03:05:34 +0200
- Received: from Princeton.EDU by relay2.UU.NET with SMTP
- id QQwzzw26206; Sun, 24 Jul 1994 21:04:57 -0400
- Received: from fs.Princeton.EDU by Princeton.EDU (5.65b/2.111/princeton)
- id AA27894; Sun, 24 Jul 94 21:01:30 -0400
- Received: by cs.Princeton.EDU (4.1/1.105)
- id AA27857; Sun, 24 Jul 94 21:02:09 EDT
- Received: from arthur.cs.purdue.edu by cs.Princeton.EDU (4.1/1.105)
- id AA27798; Sun, 24 Jul 94 21:01:51 EDT
- Received: from icarus.cs.purdue.edu (root@icarus.cs.purdue.edu [128.10.8.56])
- by arthur.cs.purdue.edu (8.6.4/PURDUE_CS-1.3) with ESMTP
- id <UAA25710> for <rayshade-users@cs.Princeton.EDU>; Sun, 24 Jul 1994 20:01:49 -0500
- Received: from localhost (bj@localhost [127.0.0.1])
- by icarus.cs.purdue.edu (8.6.4/PURDUE_CS-1.3) with SMTP
- id <UAA29800> for <rayshade-users@cs.Princeton.EDU>; Sun, 24 Jul 1994 20:01:49 -0500
- Organization: Institute of Computer Science,
- Foundation for Research and Technology-Hellas (FORTH)
- Science and Technology Park
- P.O.Box 1385, GR 711 10 Heraklion, Crete, Greece
- tel.: +30 (81) 39 16 00, fax: +30 (81) 39 16 01
- Message-Id: <199407250101.UAA29800@icarus.cs.purdue.edu>
- Date: Sun, 24 Jul 1994 20:01:48 -0500
- Errors-To: rayshade-users-request@cs.Princeton.EDU
- Remailed-Date: Sun Jul 24 21:01:53 EDT 1994
- From: bj@cs.purdue.edu (Ben Jackson)
- To: rayshade-users@cs.Princeton.EDU
- Subject: right way to add 2d textures
-
- Someone just posted a fairly elegant (though slightly buggy :-) hexagon
- mapping to comp.graphics.raytracing. I used it to add a hexagon
- texture to rayshade that works like checker (you specify two alternate
- surfaces). Unlike the "checker" texture, though, the hexagonal mapping
- doesn't apply well in 3d. Should my new texture take a `map' component,
- and apply like an image? Is there a better way to handle this?
-
- On a side note, while reading checker.c I noticed a small bug. In the
- function which creates a Checker structure, the sizeof the wrong thing
- is passed to Malloc(). It doesn't cause a coredump because the two
- things happen to be the same size, but I figured it was worth fixing.
- The context diff is appended.
-
- --Ben
-
- *** 1.1 1994/07/24 23:57:39
- --- libray/libtext/checker.c 1994/07/24 23:57:54
- ***************
- *** 34,40 ****
- Surface *surf;
- {
- Checker *checker;
- ! checker = (Checker *)Malloc(sizeof(checker));
- checker->surf = surf;
- return checker;
- }
- --- 34,40 ----
- Surface *surf;
- {
- Checker *checker;
- ! checker = (Checker *)Malloc(sizeof(Checker));
- checker->surf = surf;
- return checker;
- }
-
- ----------
- Administrivia: rayshade-users-request@cs.princeton.edu
- Mailing list: rayshade-users@cs.princeton.edu
-
-