Recent

Author Topic: Naive question on simple graphics  (Read 3732 times)

Gravitas

  • New Member
  • *
  • Posts: 19
Re: Naive question on simple graphics
« Reply #15 on: January 07, 2025, 04:44:44 pm »
...
Thank you very much for your answers -in total.

1. Well the book is old. I have not get in the point where it discusses graphics --the initial example is taken from another (short) book.
2. I agree, regarding the value of PtcGraph, yet, the quality is very bad (to my taste) --especially for simulations and math representations.

In due course, I will try either Allegro or SDL2, or Raylib (I think, in all of them there are Pascal bindings). I just wanted to get my feet wet, for a while, and (above all) to check that my FPC installation works as expected.

Again, thank you all for your kind replies!

Thaddy

  • Hero Member
  • *****
  • Posts: 16411
  • Censorship about opinions does not belong here.
Re: Naive question on simple graphics
« Reply #16 on: January 07, 2025, 05:25:24 pm »
Can you elaborate on 2), because you are very wrong in my opinion: it is of the highest quality:
- it supports 35+ year old TP style pascal and all those old units like crt,graph etc.
- it is cross-platform
- the sourcecode is professionally written and very clear
- to summarize: if you don't like it, then in my opinion you do not know what you are doing.

My own serious experience with Pascal dates from 1980 at University. Two years later I taught it to my fellow students in an educator role (payed by the University).

To summarize: the ptc units are the new 40 year old code, no changes in use, no changes in syntax.
If you could use it 40 years ago, you can use it now. And you can use the olden documentation too for 80% or more.
« Last Edit: January 07, 2025, 05:47:10 pm by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

Gravitas

  • New Member
  • *
  • Posts: 19
Re: Naive question on simple graphics
« Reply #17 on: January 08, 2025, 09:21:07 am »
Can you elaborate on 2), because you are very wrong in my opinion: it is of the highest quality:
...
Hello.

I would not disagree with you about the quality of the work -besides, I do not have neither your knowledge, nor your expertise.
What I said is just a matter of aesthetics and personal preference regarding the output -as compared to things I have seen e.g., in C and Raylib. On the other hand, as TRon has indicated, I am lacking the fundamentals of the system --something which could, perhaps, explain the bad result (i.e., I might be misusing the unit).

Again, thank you all.

TRon

  • Hero Member
  • *****
  • Posts: 3811
Re: Naive question on simple graphics
« Reply #18 on: January 08, 2025, 12:44:24 pm »
As a sidenote:
The code that I suggested to use/test was only meant for the purpose of testing (in order to check whether or not PTCGraph worked for that system). The code was not meant to be used as a showcase for PTCGraph (other than showing what basics steps needs to be done in order to produce some graphical output).

Because the mention of a book aimed at turbo pascal 4 you should also not expect high standard graphics from the examples listed in that book. Books addressed at earlier versions of Turbo pascal probably even only showed examples using only black and white graphics.

I/we cannot read your mind, do not know your time-schedule or know anything about your enthusiasm and/or persistence. Let alone know anything about future plans.

If your have done the research on the different available graphical frameworks/libraries and have more or less have developed a preference for a particular library then by all means invest your time in/for that library.

Do note that most libraries such as castle, raylib, sdl etc. are more aimed at developing games. As such these are most probably not specifically aimed at f.e. displaying  statistics, 3d-models, technical data etc while other libraries (not specifically aimed at games) might have specific provisions for such things.

Having said that and as long as the library (any which one) is able to draw a pixel on some sort of canvas and you have the knowledge then everything you are able to come up with is possible to represent in graphics with such library.
« Last Edit: January 08, 2025, 12:48:09 pm by TRon »
I do not have to remember anything anymore thanks to total-recall.

Gravitas

  • New Member
  • *
  • Posts: 19
Re: Naive question on simple graphics
« Reply #19 on: January 08, 2025, 01:43:36 pm »
As a sidenote:

...
Hello,
I totally agree with you. As I have said, I am learning (because the student years, in which I learnt Pascal, seem now extremely vague) (again) Pascal -in my spare time. I am not into CS studies/prof -it is just a hobby. Of course I am open to try well established things -instead of going to new ones. But, if not mistaken, you said that you were not aware of any contemporary reference on PtcGraph. Also, I was not able to find anything (but this does not mean something, since I am an amateur).

The only reason I mentioned Allegro (with I know that it is used e.g., in FreeOberon) and Raylib, is because (I think that) I can find references. Perhaps I could get the same visually appealing result in PtcGraph, but I do not know where to find references ;-)

P.S. Swan's book is used just to learn Pascal (without OO) in general -it has nothing to do with graphics and animations/simulations (besides it is around 800 pages, so no space for such a thing).

TRon

  • Hero Member
  • *****
  • Posts: 3811
Re: Naive question on simple graphics
« Reply #20 on: January 08, 2025, 01:58:08 pm »
But, if not mistaken, you said that you were not aware of any contemporary reference on PtcGraph. Also, I was not able to find anything (but this does not mean something, since I am an amateur).
I mentioned in specific PTC (The underlying framework that is used to build PTCGraph/PTCCrt/PTCPas/etc).

Because they are compatible (at least as compatible as possible)
PTCGraph -> unit graph
PTCCrt -> unit crt
And ofc. about any tutorial you are able to find (online) that uses unit Graph and unit CRT

Homepage of PTCPas

Raylib for lazarus, Raylib (references in c but should be 1:1 compatible). The Pascal developers of Raylib are fairly active on this forum.

Allegro wikientry

wiki game-engines

Quote
P.S. Swan's book is used just to learn Pascal (without OO) in general -it has nothing to do with graphics and animations/simulations (besides it is around 800 pages, so no space for such a thing).
Aha, ok. Thank you for mentioning that because I was not aware (I am not familiar with the contents of that book).
I do not have to remember anything anymore thanks to total-recall.

Gravitas

  • New Member
  • *
  • Posts: 19
Re: Naive question on simple graphics
« Reply #21 on: January 08, 2025, 02:40:34 pm »

Aha, ok. Thank you for mentioning that because I was not aware (I am not familiar with the contents of that book).

Many thanks for the references.

Swan's book is very nice. Ditto for "Oh! Pascal" by D. Cooper and M. Clancy. On a more advanced level (I do not think to be able to get there), "on Pascal Compilers" by B. Hansen.

 

TinyPortal © 2005-2018