Afterwarp Development  

Go Back   Afterwarp Development > Software/Game Development > Programming and Graphics
Programming and Graphics Discuss any issues related to programming using Borland Delphi and computer graphics.


Reply
 
Thread Tools Display Modes
  (#1) Old
Ermol Ermol is offline
Visitor
Ermol is on a distinguished road
 
Posts: 4
Join Date: Nov 2009
bezier line - 21-Nov-2009, 20:48

hi everybody!
I here the newcomer, and I like Asphyre!
I have a little changed Particles Basic sample. It my first step in Asphyre and I will be glad all your comments.
Here I used movement on a circle. May be anybody can prompt as to use for this case bezier curves? The "Fluffy Shooter" made by lusiola and NURBS does not want to work with me (( (Sphinx; BD 2007).
Attached Thumbnails
Click image for larger version

Name:	screen1.jpg
Views:	56
Size:	59.8 KB
ID:	1527  
Attached Files
File Type: rar candle.rar (1.38 MB, 65 views)

Last edited by Ermol; 22-Nov-2009 at 16:56.
Reply With Quote
  (#2) Old
Aegis Aegis is offline
Moderator
Aegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of light
 
Aegis's Avatar
 
Posts: 191
Join Date: Feb 2009
Location: Russia, Voronezh
Send a message via ICQ to Aegis
21-Nov-2009, 22:44

I'm getting Access Violation always after ~1 sec after pressing Space key


Sorry for my english.
Using Asphyre eXtreme 3.1
Reply With Quote
  (#3) Old
Ermol Ermol is offline
Visitor
Ermol is on a distinguished road
 
Posts: 4
Join Date: Nov 2009
22-Nov-2009, 05:48

Wow, good day Mr Aegis!
I'm frown too. I'm checked it on 3 different computers, downloaded files from my post and checked another time. All working.
Anybody else have a problem?
Later I will upload sourse cod.
Reply With Quote
  (#4) Old
Aegis Aegis is offline
Moderator
Aegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of lightAegis is a glorious beacon of light
 
Aegis's Avatar
 
Posts: 191
Join Date: Feb 2009
Location: Russia, Voronezh
Send a message via ICQ to Aegis
22-Nov-2009, 06:49

It works fine, when i'm switching it to full screen mode by Alt+Enter, before pressing space key... "Windowed" mode really little strange, like fake full screen mode... Maybe, error occurs because of the wide screen resolution (1920x1200)?


Sorry for my english.
Using Asphyre eXtreme 3.1
Reply With Quote
  (#5) Old
Ermol Ermol is offline
Visitor
Ermol is on a distinguished road
 
Posts: 4
Join Date: Nov 2009
22-Nov-2009, 17:25

Thank you! I made changes to the project, made it real full screen. I could not get this error, because my highest resolution - 1280x800.
So no need for source code, it's simple.
Reply With Quote
  (#6) Old
Ermol Ermol is offline
Visitor
Ermol is on a distinguished road
 
Posts: 4
Join Date: Nov 2009
04-Feb-2010, 13:20

After some time I come back to Particles. The decision was not difficult and will be possible interesting to someone. We create function which under the formula of cubic Bezier curve counts a point finding:

Code:
function TMainForm.Points(P0, P1, P2, P3: TPoint;
  Count, Index: Integer): TPoint;
var
  T, C0, C1, C2, C3: Extended;
begin
  T := Index / Count;
  C3 := T * T * T;
  C0 := C3 * -1 + T * T * 3 + T * -3 + 1;
  C1 := C3 * 3 + T * T * -6 + T * 3;
  C2 := C3 * -3 + T * T * 3;
  Result.X := Trunc(C0 * P0.X + C1 * P1.X + C2 * P2.X + C3 * P3.X);
  Result.Y := Trunc(C0 * P0.Y + C1 * P1.Y + C2 * P2.Y + C3 * P3.Y);
end;
In FormCreate we set four points (they can be set during program performance):

Code:
  A := Point(763, 310);
  A1 := Point(100, -300);
  B1 := Point(-100, 1500);
  B := Point(763, 0);

In RenderEvent we cause function and Particles:

Code:
   begin
    if (i < 200) then
    begin
      inc(i);
      Count:=200;
      if i mod 3=0 then
      begin
      P := Points(A, A1, B1, B, Count, i);
      XPS:=XPM.Launch('poem2',point2(p.x, p.y));
      XPS.FSettings.ColorStart:= cRGB1(0,0,255,55);
      end;
    end;
They are obediently sprayed, moving on a curve.


The task is solved.. But I in a silly condition once again. I can include particles only on standard events of the form, such as FormClick or FormCreate. Prompt, please, as I can to cause them on Collision. In Hasteroids example collisions are described separately in HAObjects.pas

P.S. to Aegis: Good day and should I begin a new thread?
Attached Thumbnails
Click image for larger version

Name:	shot.jpg
Views:	32
Size:	35.9 KB
ID:	1550  

Last edited by Ermol; 04-Feb-2010 at 13:52.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line thickness in Asphyre Extreme 3.1.0 neobusy Development 4 21-Nov-2009 11:29
[?] How use ashpyre in command line application, not VCL arthur Technical Support 11 09-Aug-2007 18:07
How do I draw a simple antialiased line? sofakng Development 1 15-Mar-2007 16:53
Rounded polygons, bezier curves and cubic curves holypodi Published Resources 4 20-Dec-2006 12:47
Line with weight Gugle Development 0 19-Sep-2006 10:57



vBulletin® is copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 2000 - 2008 Afterwarp Development. All rights reserved.