Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
Mine still doesn't work, but I added black tabs. If you cut and paste the cube together, (black tabs inside) it should show where the colors should be. load 'viewmat' N=:<.63.75*i.5 W=:5 5$100 T=:(4 5$100),5#0 R=:5 5$(4#100),0 L=:|:|.|:R E=:15$5(#"0)100 0 BLUE=:(2#"1,.(4#0),N),.N,4#255 RED=:2 0

Re: [Jprogramming] Alpha Transparency in Plot?

2015-06-26 Thread bill lam
gl2 now has glrgba cmd for alpha channel. plot is also too complicated for me to follow. If you want to hack, then search for all those 2032 which means glrgb and change them to 2343 (glrgba). Of course life is not that easy, but this should be a starting point. On Jun 27, 2015 12:31 PM, "June K

Re: [Jprogramming] Alpha Transparency in Plot?

2015-06-26 Thread 김창준
Hello Years ago, I asked about using alpha channels in plot. Bill Lam showed one way of possibility. I have used a different tool(R's ggplot) then. Now I am looking into J's plot again. Is there any simple way to add transparency in plot? I have explored the source code for a while but it was jus

Re: [Jprogramming] gles

2015-06-26 Thread Raul Miller
That works. It's about three times as complicated as I was hoping for, so I'll want to study the mechanisms, but you've given me what looks like a good starting point. Thanks, -- Raul On Fri, Jun 26, 2015 at 10:11 PM, bill lam wrote: > Here is a simple example from opengl superbible > >> htt

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Raul Miller
Mike set things up so we can change the colors on the line which invokes mycube. I think 30 mycube BLACK,BLUE,CYAN,GREEN,YELLOW,WHITE,MAGENTA,:RED gets it right. Does that seem right to you? I've changed the gist to use that line. Thanks, -- Raul On Fri, Jun 26, 2015 at 10:27 PM, Linda Alvo

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
When I looked at it again, there is what I think may be an easily correctable problem. When you fold up the cube one corner should be the center of a three dimensional graph. Black should extend to blue, red and green from the same corner. Thens the white corner of the cube should be diagonally op

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
That's the end of the story folks! It has been quite a journey. Now all I have to do is figure out all the options for teaching it to fourth graders. Thank you Bill, Raul, Mike and Brian and everyone who suffered through the many emails. Linda -Original Message- From: programming-boun..

Re: [Jprogramming] gles

2015-06-26 Thread bill lam
Here is a simple example from opengl superbible > https://github.com/openglsuperbible/sb6code/blob/master/src/singlepoint/singlepoint.cpp A direct translation without gles utility verbs is (beware line wrapping) require 'gles' coclass 'singlepoint' coinsert 'jgles' fix_version=: 3 : 0 GLSL=. w

Re: [Jprogramming] gles

2015-06-26 Thread Raul Miller
https://www.opengl.org/discussion_boards/showthread.php/164054-Frag-shader-without-vertex-shader seems to confirm that vertex shaders are supposed to be optional. But I have added a vertex shader, and that did not help. Also, I moved glUseProgram into the paint event - and that made no difference

Re: [Jprogramming] gles

2015-06-26 Thread bill lam
Also can you confirm vertex (rather than fragment) shader is optional? On Jun 27, 2015 8:56 AM, "Raul Miller" wrote: > That's an interesting clue. Thank you. > > But I'm still not understanding something important. For example, this > still renders black: > > require 'graphics/gl2 api/gles' > co

Re: [Jprogramming] gles

2015-06-26 Thread bill lam
I think the line glUseProgram program should be placed inside paint event. Пт, 26 июн 2015, Raul Miller написал(а): > That's an interesting clue. Thank you. > > But I'm still not understanding something important. For example, this > still renders black: > > require 'graphics/gl2 api/gles' >

Re: [Jprogramming] gles

2015-06-26 Thread Raul Miller
That's an interesting clue. Thank you. But I'm still not understanding something important. For example, this still renders black: require 'graphics/gl2 api/gles' coinsert 'jgl2 jgles' FORM=: 0 : 0 pc form closeok; minwh 320 240; cc gl opengl flush; ) fshader=: 0 :0 #version 110 void main(

Re: [Jprogramming] gles

2015-06-26 Thread bill lam
you run opengl functions in form_run but opengl context has not yet available at that point. try put them inside the initialize callback. see the shader.ijs demo. you can query the version of shader langauge in the initialize callback and determine whether you need the #version header. On Jun 27,

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Joe Bogner
Looks great on jqt for android too. Thanks for the easy paste http://imgur.com/QSNhOZW On Jun 26, 2015 8:31 PM, "Raul Miller" wrote: > Try https://gist.github.com/rdm/3b11815d4af7392e1f62? > > Thanks, > > -- > Raul > > On Fri, Jun 26, 2015 at 8:21 PM, Linda Alvord > wrote: > > When I copy and p

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Raul Miller
Try https://gist.github.com/rdm/3b11815d4af7392e1f62? Thanks, -- Raul On Fri, Jun 26, 2015 at 8:21 PM, Linda Alvord wrote: > When I copy and paste your code I get one giant last line plan=:... > > Can you show me the line breaks? > > I get a two lineerror: > > |value error: plan > | plan=.

[Jprogramming] gles

2015-06-26 Thread Raul Miller
I am trying to implement a minimal example of using a shader within J. This means: no vertex shader. I just want to paint the screen a solid color. This means: no #version header (which I believe is equivalent to #version 110). Unfortunately, while this should work in principle, a number of vari

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
When I copy and paste your code I get one giant last line plan=:... Can you show me the line breaks? I get a two lineerror: |value error: plan | plan=.BASE(<3 1)}FRONT(<2 1)}(LEFT,TOP,RIGHT)1}BACK(<0 1)}4 3$BLANK colours=.,/,/>,"_1 each/"1 nsteps mysquarecolours each plan colours viewmat i.

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Raul Miller
When I don't want lines to wrap in email, I usually just make sure no lines are longer than 72 characters. Other approaches (encodings) are also possible, but that can get quirky. Thanks, -- Raul On Fri, Jun 26, 2015 at 7:32 PM, Mike Day wrote: > Thanks, Brian, for taking the trouble to imp

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Mike Day
Thanks, Brian, for taking the trouble to improve the format of my code, and to report that it works for you. Your copy works for me too in a new workspace, but only if I wrap the long comment about transpose in "mysquarecolours" . One just can't win with emails! And J was designed to avoid

Re: [Jprogramming] glGetString (api/gles)

2015-06-26 Thread bill lam
gles addon is intended for both desktop and mobile, it will choose opengl or opengles depending on the running platform. those glu functions had been decommitted from opengl core profile. Your suggestion of error number look up table is reasonable. On Jun 27, 2015 6:20 AM, "Raul Miller" wrot

Re: [Jprogramming] glGetString (api/gles)

2015-06-26 Thread Raul Miller
Hmm... glu is an addon library, and nobody supports it yet for gles. Now, to some degree, I can understand - gles is designed for mobile use and thus cuts out the "frills". But for that to work someone needs to be going in and addressing the wounds which are left in the system. In this case, I g

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Brian Schott
Linda, I am able to make Mike's code work for the following case in jqt and in jhs. Both produce viewmats. Perhaps you could try it because it eliminates blank lines and includes other side verbs and nouns. NB. Mike Day NB. 6/25/15 load'viewmat' 'BLACK BLUE GREEN CYAN RED MAGENTA YELLOW WHITE'

Re: [Jprogramming] glGetString (api/gles)

2015-06-26 Thread Brian Schott
Raul, I am not currently exploring openGL, but I have an old RED printed manual which says that gluErrorString() [not glGetString ?] should be used with glGetError(). The following code snippet is from the RED book. GLenum errCode; const GLubyte *errString; if ((errCode = glGetErrof()) != GL_NO_

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
Mike, I also useJHS in Chrome so that isn't the problem I am having. Here's the lastest that I put together. I have not yet gotten one to work. I like the simplicity of how it looks, but I ususally wait until I get something that works and then take it apart step by stem. Since Raul's is work

[Jprogramming] glGetString (api/gles)

2015-06-26 Thread Raul Miller
Conceptually speaking, when working with opengl, if there's an error, you should be able to use glGetError and I think glGetString to diagnose the error. So, for example: require 'graphics/gl2 api/gles' coinsert 'jgl2 jgles' FORM=: 0 : 0 pc form closeok; minwh 320 240; cc gl opengl flush; ) f

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Mike Day
Linda, so did my code work for you with the corrections I'd indicated? Mike On 26/06/2015 11:16, Linda Alvord wrote: For a long time viewmat would only provide images as a square or a 2x1 or 1x2 rectangle. The pattern for the cube didn't fit in it nicely so I built my pattern in a square. (j

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Linda Alvord
For a long time viewmat would only provide images as a square or a 2x1 or 1x2 rectangle. The pattern for the cube didn't fit in it nicely so I built my pattern in a square. (jq All of a sudden, it seem to me, that the image will conform to the shape of the right argument of viewmat. This is qui

Re: [Jprogramming] J804 beta

2015-06-26 Thread Jon Hough
Would it not be a good idea to put it in the Google Play store? Gforth has an app in there. --- Original Message --- From: "Skip Cave" Sent: June 26, 2015 4:01 PM To: "programm...@jsoftware.com" Subject: Re: [Jprogramming] J804 beta Bill, Removing the previous J install fixed it. Thanks for

Re: [Jprogramming] simplify

2015-06-26 Thread 'Bo Jacoby' via Programming
   datatype 1 2 3 7integer   datatype 2 simplify 1 2 3 7floating   datatype 3 simplify 1 2 3 7complex   (2&simplify=[:2&simplify 3&simplify) 1 2 3 71 1A correct result may be non-real!  Den 9:53 fredag den 26. juni 2015 skrev 'Bo Jacoby' via Programming : Explanation: The vecto

Re: [Jprogramming] Trouble making patter for a color cube

2015-06-26 Thread Mike Day
Mainly for Linda. I've just had a go at running my code under JHS, in Google Chrome. (I mention that since the choice of browser might perhaps have an effect on graphics.) Once I'd worked out how to load a script file, it worked fine. Raul's remarks about 4x3 arrays etc related to the layout of

Re: [Jprogramming] simplify

2015-06-26 Thread 'Bo Jacoby' via Programming
Explanation: The vector 'A simplify B' has the same A moments as the vector B.Examples:   1 simplify 0 21   2 simplify 0 20 2   3 simplify 0 2_0.224745 1 2.22474   2 simplify 3 simplify 0 20 2   1 simplify 3 simplify 0 21 Den 0:04 fredag den 26. juni 2015 skrev Kip Murray : 1

Re: [Jprogramming] J804 beta

2015-06-26 Thread Skip Cave
Bill, Removing the previous J install fixed it. Thanks for the help. Skip Skip Cave On Thu, Jun 25, 2015 at 11:11 PM, bill lam wrote: > the signing key has changed, you have to uninstall the old jqt first. > On Jun 26, 2015 12:07 PM, "Skip Cave" wrote: > > > I tried to install J804 Beta on