hP PRIME - Notation of vector
04-26-2015, 11:34 AM
Post: #1
 wChris79 Junior Member Posts: 22 Joined: Apr 2015
hP PRIME - Notation of vector
How to write a vector such as the vector AB with an arrow on AB ?

Thanks,
wChris79
04-26-2015, 01:47 PM (This post was last modified: 04-26-2015 01:51 PM by DrD.)
Post: #2
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
This? $$\vec{AB}$$ $$vector \vec{AB}$$
04-26-2015, 01:51 PM
Post: #3
 wChris79 Junior Member Posts: 22 Joined: Apr 2015
RE: hP PRIME - Notation of vector
Yes. How to get it in the PRINT function for example ?
04-26-2015, 02:04 PM (This post was last modified: 04-27-2015 09:07 PM by DrD.)
Post: #4
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
Well, there is almost always a way to accomplish things, but a simple answer is that I'm not sure it is simple.

One way to accomplish your objective is to use grob's. If you are familiar with the process involved in doing that, the world is at your fingertips. Otherwise, you would need to trek up the grob learning curve, which isn't all that hard to do. Mostly, it boils down to the dimgrob, rect, blit, and textout commands.

Fast? No. Functional? Yes.

-Dale-
04-26-2015, 02:31 PM
Post: #5
 wChris79 Junior Member Posts: 22 Joined: Apr 2015
RE: hP PRIME - Notation of vector
OK. I will try the method specified.
Thanks.
wChris79.
04-26-2015, 07:15 PM
Post: #6
 wChris79 Junior Member Posts: 22 Joined: Apr 2015
RE: hP PRIME - Notation of vector
With "TEXTOUT_P" it works...
Thank you again.
04-27-2015, 06:23 AM
Post: #7
 Thomas_Sch Senior Member Posts: 312 Joined: Dec 2013
RE: hP PRIME - Notation of vector
(04-26-2015 07:15 PM)wChris79 Wrote:  With "TEXTOUT_P" it works...
Thank you again.
Thanks!
04-27-2015, 12:42 PM
Post: #8
 wChris79 Junior Member Posts: 22 Joined: Apr 2015
RE: hP PRIME - Notation of vector
In fact I write 2 lines.
And "PRINT" command can also be used.
PRINT ("->");
PRINT (AB); ->
I do not know to create a character like vector (AB) in 1 character.
If you know how to thank you for letting me explain.
04-27-2015, 01:02 PM
Post: #9
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
(04-27-2015 06:23 AM)Thomas_Sch Wrote:
(04-26-2015 07:15 PM)wChris79 Wrote:  With "TEXTOUT_P" it works...
Thank you again.
Thanks!

An example:

Code:
 EXPORT test() BEGIN    rect;   TEXTOUT_P("➝",G0,180,95,2,RGB(128,32,64));   TEXTOUT_P("vector AB",G0,140,104,2,RGB(128,32,64));   wait(-1); END;

-Dale-
04-27-2015, 01:06 PM
Post: #10
 Thomas_Sch Senior Member Posts: 312 Joined: Dec 2013
RE: hP PRIME - Notation of vector
(04-27-2015 01:02 PM)DrD Wrote:  An example:

Code:
 EXPORT test() BEGIN    rect;   TEXTOUT_P("➝",G0,180,95,2,RGB(128,32,64));   TEXTOUT_P("vector AB",G0,140,104,2,RGB(128,32,64));   wait(-1); END;

-Dale-
Hello Dale,
thank you!
04-27-2015, 01:16 PM
Post: #11
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
You're welcome. Awhile back, when we were discussing the Smith Chart program I was making, I needed to "rotate text," and I think it was Parisse that mentioned it wasn't possible, short of BLIT-ing this and that. Well, I almost wish he hadn't made that suggestion, as a couple of days later, I had it rotating text like crazy, but my brain was fried! It was fun(?) in some sort of self-punishing way. I also finally got all the resistance and reactance circles to terminate at the proper place.

In all, most things are possible, to whatever extent one is willing to endure.

-Dale-
04-27-2015, 01:26 PM
Post: #12
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
As an after-thought, it sure would be handy if there was a built-in method to allow super/subscripting, ex post facto. That way you could embellish text with appropriate notation, (such as the arrow in this example), or maybe some subscripted enumeration, AFTER the base text was in place.

This might work nicely by selecting the text item(s), invoking the function, and appending the sub/super to the selection. Maybe using a soft-key function from the shift-Chars key would make sense?

Pretty sure this will never happen, but ...

-Dale-
04-27-2015, 03:28 PM
Post: #13
 Thomas_Sch Senior Member Posts: 312 Joined: Dec 2013
RE: hP PRIME - Notation of vector
(04-27-2015 01:16 PM)DrD Wrote:  You're welcome. Awhile back, when we were discussing the Smith Chart program I was making, I needed to "rotate text," and I think it was Parisse that mentioned it wasn't possible, short of BLIT-ing this and that. Well, I almost wish he hadn't made that suggestion, as a couple of days later, I had it rotating text like crazy, but my brain was fried! It was fun(?) in some sort of self-punishing way. I also finally got all the resistance and reactance circles to terminate at the proper place.

In all, most things are possible, to whatever extent one is willing to endure.

-Dale-
It's great to hear the news about the Smith Chart.
Your attempts to rotate text had been very demanding, and the restrictions given by the resolution of the display are limiting the posibilities.
If the available libraries are limited, extending them results in an extra project.

Maybe an approach with zoom functions (showing labels after zooming in) will be interesting, but this will again distract from the Smith Chart himself.
Do you want to show the current status? (screenshot?)
04-27-2015, 09:29 PM (This post was last modified: 04-27-2015 09:48 PM by DrD.)
Post: #14
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
[/quote]
It's great to hear the news about the Smith Chart.
Your attempts to rotate text had been very demanding, and the restrictions given by the resolution of the display are limiting the posibilities.
If the available libraries are limited, extending them results in an extra project.

Maybe an approach with zoom functions (showing labels after zooming in) will be interesting, but this will again distract from the Smith Chart himself.
Do you want to show the current status? (screenshot?)
[/quote]

Here's a screenshot of the Smith Chart so far. It seems just about the time I can see the end game, I want to add more features to it. So it is not completely up to my expectations, just yet.

04-28-2015, 05:55 AM (This post was last modified: 04-28-2015 05:56 AM by Thomas_Sch.)
Post: #15
 Thomas_Sch Senior Member Posts: 312 Joined: Dec 2013
RE: hP PRIME - Notation of vector
(04-27-2015 09:29 PM)DrD Wrote:  Here's a screenshot of the Smith Chart so far. It seems just about the time I can see the end game, I want to add more features to it. So it is not completely up to my expectations, just yet.
Thank you for the screenshot, in my opinion you now have a great inspiration for the functions!
Good luck for the next steps, I'm eager to hear from your projects again.
04-28-2015, 09:42 AM
Post: #16
 salvomic Senior Member Posts: 1,392 Joined: Jan 2015
RE: hP PRIME - Notation of vector
(04-27-2015 01:16 PM)DrD Wrote:  You're welcome. Awhile back, when we were discussing the Smith Chart program I was making, I needed to "rotate text," and I think it was Parisse that mentioned it wasn't possible, short of BLIT-ing this and that. Well, I almost wish he hadn't made that suggestion, as a couple of days later, I had it rotating text like crazy, but my brain was fried! It was fun(?) in some sort of self-punishing way. I also finally got all the resistance and reactance circles to terminate at the proper place.
In all, most things are possible, to whatever extent one is willing to endure.
-Dale-

nice to hear that, Dale!
I'm an OM too that treat with antennas an so on..., and for me Smith chart is very interesting.

73
Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
04-28-2015, 01:26 PM
Post: #17
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: hP PRIME - Notation of vector
Discussion of the Smith Chart project should probably be moved to it's own thread, rather than hijack this one.

I can give a quick overview:

The initial goals were to be able to plot on a graphic chart:

1. gamma (reflection coefficient) or Zload parameters.
2. SWR in terms of forward and reflected power, and VSWR in terms of gamma or Zload.
3. The chart has a routine that allows clicking anywhere within, and displays the data point (complex) value in the upper right hand area; with the ability to clear all data, using a fresh chart. At this point, all of these things are implemented.

Additionally, I want to include more dynamic details, including network development for impedance matching, and capturing S-parameter info.

The "hell" of it was getting it all to work, and realizing afterwards how much better the coding could become, with benefit of experience. (translated: what NOT to do!).

Most challenging was computing the reactance circles (or arcs, as they appear on the chart). Fortunately, once I figured out how to get the upper (inductive reactance) circles, the other half (capacitive reactance) was easy! The starting point is the same for all of them, but the termination point on the outer resistance circle was not so easy to get working, for this old guy!

I find it very enjoyable, as I'm sure you do with your own projects, to carve away each technical difficulty, and see it finally emerge as the sculpture you (hopefully) envisioned. Other people, including my wife, see it as just another obsession! But, I'm always cautious NOT to mention anything about all that stupid fabric she collects, or the quilting remnants and other junk in her sewing room ...

-Dale-
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)