Hi David,
        I too have considerable experience using MATLAB are you aware of a
free license for old retired types.
Important to note here that MATLAB and Poplog were developed with very
different roles in mind. 
Both are great fun.

Best regards
Dave

-----Original Message-----
From: David Young <[email protected]> 
Sent: 06 July 2021 11:13
To: Discussion of Poplog and Pop11 <[email protected]>; Aaron Sloman
<[email protected]>
Subject: Re: (POP-FORUM) popvision package: Finding rc_context

Hi Aaron,

Just to confirm: popvision integrates with rc_graphic through the rc_array
library (and its simplified interface rci_show). I wrote this when I
realised that it would be nice to look at images that weren't made of
printed characters.

There's an essay to be written in this context about differences between
Poplog and MATLAB, but I don't know when I'll get time to write it. (The
bottom line: I use MATLAB for everything these days, and have for years, but
quite often wish I could write in Pop11.)

David

On 06/07/2021 05:30, Aaron Sloman wrote:
> Hi Dave
> 
> I should have answered this earlier, but other preoccupations put it 
> out of my mind. I'm very sorry about this.
> 
> I am not sure this response is clear, or coherent, but perhaps you can 
> find something useful in it if you still need an answer.
> 
> You wrote:
> 
>  > My installation to fails to find "rc_context" so we have a  > 
> difference in our "setups" - which is not surprising.
>  > I will dig deeper.
> 
> As you may be now have worked out, this is a result of missing out a 
> 'uses' or 'lib' command somewhere, which would have set up the 
> appropriate search list.
> 
> A generally useful piece of information is that poplog, when installed 
> with the Birmingham packages, extends its list of indexes showing 
> where various things are defined, but some of the indexes only become 
> visible if you load the library file for the appropriate group of 
> files.
> 
> If completely lost you can try, in ved
> 
> ENTER ref index
> 
> It shows some of the indexes and adds:
> 
> NOTE: Some indexes may not be available until appropriate libraries 
> have been loaded.
> 
> There are more tools, but I've forgotten some of them.
> 
> Anyhow, in case you have not yet solved this problem. You wrote:
> 
>  > My installation to fails to find "rc_context" so we have a  > 
> difference in our "setups" - which is not surprising.
> 
> I can't tell at which stage you failed to find it, but I think this 
> must be a result of missing a step in setting up one of the rclib
libraries.
> 
> This is unfortunately very easy to do!
> 
> Note:
> 'rc' stands for relative coordinates, because the drawing commands and 
> related picture interrogation commands in pop11 allow use of 
> temporary, changing, coordinate frames, which can also be nested.
> 
> So the very same drawing command (e.g. to draw a triangle) can produce 
> different results (e.g. size and orientation of triangle) depending on 
> which 'context' is currently in use. Likewise commands for 
> interrogating graphical 2d arrays of 'pixel' values.
> 
> The library file rc_context.p is part of the core rc_graphic (relative 
> coordinates graphic) library which is part of the extension of the 
> core of poplog to support X window graphical facilities, though it was 
> *originally* designed to help students treat a printable 2D array of 
> characters as a graphical interface, around 1976, long before 
> graphical terminals became generally affordable, and even typing was done
using paper terminals.
> 
> Pictures were typically merely arrays of asterisks.
> 
> Some of those (pseudo-)graphical facilities are provided in the core 
> of poplog, and additional demos and applications are added in 
> libraries in the packages directory tree located at:
> 
> $usepop/pop/packages/rclib/*
> 
> rc_context is part of the core rcgraphic library, which is included in 
> the 'x'
> (for X window) subdirectory of core poplog (i.e. not in the packages
> directory):
> 
> $usepop/pop/x/
> general X stuff
> $usepop/pop/x/pop/
> pop specific stuff
> $usepop/pop/x/pop/lib
> libraries, including
> $usepop/pop/x/pop/lib/rc_graphic.p
> This library provides a collection of graphical utilities making it 
> easy to do things relative to a user co-ordinate frame instead of 
> window
> 
> It was located the X subdirectory when pop11 was several years older 
> and we had facilities for accessing graphical terminals using the X 
> window system, not just printable arrays.
> 
> [Before X and motif, and the Sun graphical tools arrived we had a home 
> grown graphical toolkit designed and implemented by Ben Rubinstein. 
> There may be a relic of it somewhere in the poplog tree. I've 
> forgotten its name.]
> 
> The current rc_graphic facilities use
> 
> $usepop/pop/x/pop/lib/rc_context.p
> 
> Which should be found by 'showlib rc_context' if your poplog search 
> lists have been set up properly.
> 
> rc_context allows graphical commands to be run in a context (or a 
> collection of nested contexts) providing coordinate transformations.
> 
> There's some documentation in this file, which can be accessed via the 
> Ved command: ENTER help rclib or on the internet:
> 
> http://www.cs.bham.ac.uk/research/poplog/rclib/help/rclib
> <http://www.cs.bham.ac.uk/research/poplog/rclib/help/rclib>
> 
> HOWEVER:
> 
> The core of poplog contains only the original rclib graphical package, 
> for drawing and accessing pictures using (possibly nested) coordinate
frames.
> 
> BUT there are substantial additions to rclib in the packages 
> directory, and I think some of these are used by David's popvision 
> system:
> 
> $usepop/pop/packages/rclib/
> 
> That has a collection of subdirectories providing additional code 
> (including tutorial demos) and documentation, including
> 
> $usepop/pop/packages/rclib/auto/
> $usepop/pop/packages/rclib/lib/
> $usepop/pop/packages/rclib/teach/
> $usepop/pop/packages/rclib/help/
> $usepop/pop/packages/rclib/ref/
> $usepop/pop/packages/rclib/demo/
> 
> Did you compile lib popvision before running any of the teach files?
> 
> E.g. in VED
> 
> ENTER lib popvision
> 
> compiles the popvision library.
> 
> You can then use ved to view a teach file:
> 
> ENTER teach vision1
> 
> you'll see near the the top of the file
> 
> 1 Preliminaries
> 
> and lower down:
> 
> To use this file, you must be sitting at a colour workstation or 
> X-terminal, running X-windows. POPLOG version 14.2 or later must be 
> available.
> 
> .......
> 
> Before proceeding further, load the basic libraries that will be 
> needed, by marking the following indented lines and pressing <CTRL-D>. 
> This may take quite a while as external code (i.e. machine code 
> compiled from C rather than a POPLOG language) is loaded.
> 
> uses popvision ;;; search popvision libraries uses rci_show ;;; image 
> display utility uses showarray ;;; array printing utility uses 
> arrayfile ;;; array storage utility uses sunrasterfile ;;; alternative 
> image storage
> 
> NOTE: if you are reading that in the Ved editor, then you can compile 
> all those libraries by marking the range (all file lines marked) and 
> then do
> 
> CTRL D
> 
> That will cause pop11 to compile and run the marked lines.
> 'uses' will check whether its argument library has already been 
> compiled and if not will compile it. (In contrast 'lib xxx' will 
> always compile the xxx library.)
> 
> In Ved, you can use 'showlib' to find out what's in those files, e.g.
> 
> ENTER showlib arrayfile
> 
> I don't know whether Steve has worked out the implications of all this 
> for his debian/ubutu -based version of poplog.
> 
> I apologise for length and/or incomprehensibility of this response!
> 
> Aaron
> http://www.cs.bham.ac.uk/~axs
> <http://www.cs.bham.ac.uk/~axs>



Reply via email to