Script to draw triangles within triangle?

Moderator: Kathy_9

LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Script to draw triangles within triangle?

Post by LeviFiction »

Well, a path is a set of contours, not the line segments themselves. I would equate it to an actual object in programming, the Vector Object contains all of the settings then includes a collection of contour objects called a Path.

The Object contains the line and fill data, the Path contains all of the contours and how they relate to one another. Contours are only the line segments that make up the Path. If a contour runs in the opposite direction (counter-clockwise vs clockwise) of another contour in the same path is "cuts" a hole into that path because of PSP's fill rule.

However, I would agree, the way it is described in the help files (considering what few functions there are and none of them making the distinction functionally) to refer to both the path and the contours is a little ridiculous. If they made no distinction between the Object and Path then it would be a little better.

As for my script: Correct, each triangle is a single contour in the path of the single vector object. However, it would be very easy to create individual vector objects and just group them together so that you could effect the line and fill properties of each individual triangle if you were so inclined.
https://levifiction.wordpress.com/
photodrawken
Posts: 684
Joined: Wed Sep 26, 2012 8:40 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16Gb
Hard_Drive_Capacity: 324Gb
Location: USA

Re: Script to draw triangles within triangle?

Post by photodrawken »

OK, thanks for that. For the time being, I'll simply consider a "contour" as a grouping of line segments that share common properties.
Ken
Yes, I think it can be eeeeeasily done...
Just take everything out on Highway 61.
Marak60
Posts: 6
Joined: Sun Jan 13, 2013 12:12 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Dell 0-C2KJT
processor: Intel Core i3 550 3.20GHz
ram: 8GB
Video Card: Intel HD Graphics
sound_card: RealTek
Hard_Drive_Capacity: 1TB
Monitor/Display Make & Model: Westinghouse

Re: Script to draw triangles within triangle?

Post by Marak60 »

No need to apologize to me (the original poster). Actually I'm finding all this fascinating. I ended up creating my "triangles within triangles" (your image was exactly right, photodrawken) manually and it really didn't take all that long. I'm a programmer so I don't necessarily find any of this "hellish", but I'm completely unfamiliar with scripting in PSP, so it's all new (and interesting). Thanks to all of you for your contributions.
photodrawken
Posts: 684
Joined: Wed Sep 26, 2012 8:40 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16Gb
Hard_Drive_Capacity: 324Gb
Location: USA

Re: Script to draw triangles within triangle?

Post by photodrawken »

Hi Marak60,
Glad you got the image you needed. If you drew them in PSP, then you've got more patience than me! :wink:
Ken
Yes, I think it can be eeeeeasily done...
Just take everything out on Highway 61.
Post Reply